
March 13th, 2013, 12:42 PM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 4
Time spent in forums: 42 m 50 sec
Reputation Power: 0
|
|
|
PHP-General - PHP Mysql error - please help
Hello I keep getting this error
Code:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, board) VALUES ('hi', 'hi', 'Proxies')' at line 1
This is my php code
Code:
if ( isset( $_POST['submit'] ) ) {
$title = htmlentities($_POST['title']);
$desc = htmlentities($_POST['content']);
$board_id = $_GET["title"];
mysql_connect("host","user","pass");
mysql_select_db("db");
mysql_query("INSERT INTO thread (title, desc, board)
VALUES ('$title', '$desc', '$board_id')");
echo mysql_error();
}
why am I getting that error?
|