I am annoyingly confused here. I have been trying to solve this issue, but oddly enough I realize it was not under a single directory, it is actually my entire web server that faces this problem. I cannot in any way get, insert, or update more than one value at a time on any NEW document I create, which confuses me why it still works on old ones, but not on new ones. I have even copied the old ones to the new document and done nothing but alter the table it inserts into (with all the same values) and it produces a simple error stating '
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 'Key='AB123', IGN='test' WHERE Name='testuser'' at line 1
'.
The entire code is below:
session_start();
$name = $_POST['name'];
$appkey = $_POST['appkey'];
$usrname = $_POST['username'];
$birthday = $_POST['BirthMonth'] . "." . $_POST['birthday'] . "." . $_POST['birthyear'];
$gender = $_POST['Gender'];
$skype = $_POST['phone'];
$exp = $_POST['exp'];
$why = $_POST['why'];
include('db.php');
mysql_query("INSERT INTO query (Name, Key, IGN) VALUES ('$name', '$appkey', '$usrname')") or die(mysql_error());
(Yes, it is all in the proper tags. )
There is no answer I can find online, and everything I try to fix it does nothing. I do not want to have a long string Inserting the values.
EDIT: I have echoed the string and it results as the entire 'INSERT INTO query (Name, Key, IGN) VALUES ('$name', '$appkey', '$usrname')' string, with no problem.
Solution: I did not realize that the tag 'query' & 'Name' are protected, so finally after a few minutes with my IT teacher she help me into the right direction.