I have the following example usage:
$insert = "
INSERT INTO table (
field
) VALUES (
'".$_SESSION['field']."'
)
";
For some reason it's inserting blanks and no data is being submitted. Is what I am doing the right way?
I do have multiple fields but they were too many so just shrunk the example to include only one field.
session_start()before the statement?$_SESSION['field']does not contain a value that would not be converted into an empty string.