![]() |
Problem with INSERT!
I am trying to INSERT data into a database which has been POSTED via a html script. The posts have worked have echoed and get the right data.
The error is saying that there is a syntax error, but I have checked brackets, quotes etc and can't spot anything wrong! Can anyone see something I am missing? Code:
<?php |
This is invalid:
INSERT INTO (feedback title, .... Perhaps you mean INSERT INTO feedback (title, ...?Noticed you are using mysqli. You should used prepared statements to save the trouble from needing to run through a real_escape_string. As is, this is open to SQL Injection. |
Quote:
PHP Code:
|
Ummm...Clawed: FouLu is saying that *IF* he uses prepared statements then he will not *NEED* to use mysql_real_escape_string.
Which is not only correct, but much better than mysql_real_escape_string. If you don't know about prepared statements, then time to read up on them. |
Quote:
|
| All times are GMT +1. The time now is 11:43 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.