I am getting the following error: Parse error: syntax error, unexpected T_STRING
The code snippet:
$db = "hospital"; $cxn = mysqli_connect($host,$user,$password,$db); $sql1 = INSERT INTO intake2(site, Record, BMI, Weight) VALUES($_POST[\"site\"], $_POST[\"Record\"], $_POST[\"BMI\"], $_POST[\"Weight\"]); [TEX]// this is the line that generates the error[/TEX] $qyr = mysqli_query($cxn,$sql1);
I realize that the error is probably improper escaping of the query. I've tried everything and am still getting the same error.
Thanks in advance.