I get the following error when i fill in my form:
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 'from) VALUES ('Username', 'pass', 'emailwillbehere', 'UK')' at line 1 Here is the code for this section:
PHP Code:
$usr = $_POST['usr'];
$pwd = $_POST['pwd'];
$email = $_POST['email'];
$from = $_POST['from'];
$conn = mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($db);
$query = "INSERT INTO users (usr, pwd, email, from) VALUES ('$usr', '$pwd', '$email', '$from')";
mysql_query($query) or die(mysql_error());
(obviously im not showing the conection variables.)
I dont know what i am doing wrong, can anyone help me with what my error maybe?