I know you can’t use the ” character, tried ` instead and that didn’t work, any ideas?
$sql = $db->prepare('INSERT INTO testDB VALUES(`$title`,`$bodytext`,`$created`)');
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this:
What I did was removing the variables from the SQl query and replaced them with
?as placeholder. You only bind values to the statement at execution time.The way you tried to do it was no different from using regular SQL queries.