Hi everybody, I am very proudly presenting this error of mine. You bet.
I have a this kinda code, which does the job on my other machine(PHP 5.0.2 and Apache 1.3.33 and MySQL 3.2.53) but it doesn't work at all with this other machine of mine, that has PHP 5.0.3, Apache 1.3.33 and MySQL 3.2.53 also. Weird? Yeah. (At this new machine I turned register globals on in php.ini)
This only should add the info stored in those variables to database, but it gives me only an error.
So the code:
$query = "INSERT INTO ".$HTTP_POST_VARS["Forum"]." (Subject,PostedBy,Date,Message,ReplyID,EmailReply,LastAccessed)
VALUES('".strip_tags($HTTP_POST_VARS["Subject"])."','".$HTTP_POST_VARS["UserName"]."','".Date("m/d/Y")."','".$msg."',
'0','".$HTTP_POST_VARS["EmailReply"]."','".Date("m/d/Y").":".Date("g:iA")."')";
It says like this in browser, when using that insert code:
You have an error in your SQL syntax near '(Subject,PostedBy,Date,Message,ReplyID,EmailReply,LastAccessed) VALUES('','','' at line 1
I'm creating here a little bulletin board, and only this thing is slowing me, but badly, down.
Do you have any suggestions, what should here be done otherwise?
Any help will be highly appreciated.
Best greetings,
-0200050- Finland
I have a this kinda code, which does the job on my other machine(PHP 5.0.2 and Apache 1.3.33 and MySQL 3.2.53) but it doesn't work at all with this other machine of mine, that has PHP 5.0.3, Apache 1.3.33 and MySQL 3.2.53 also. Weird? Yeah. (At this new machine I turned register globals on in php.ini)
This only should add the info stored in those variables to database, but it gives me only an error.
So the code:
$query = "INSERT INTO ".$HTTP_POST_VARS["Forum"]." (Subject,PostedBy,Date,Message,ReplyID,EmailReply,LastAccessed)
VALUES('".strip_tags($HTTP_POST_VARS["Subject"])."','".$HTTP_POST_VARS["UserName"]."','".Date("m/d/Y")."','".$msg."',
'0','".$HTTP_POST_VARS["EmailReply"]."','".Date("m/d/Y").":".Date("g:iA")."')";
It says like this in browser, when using that insert code:
You have an error in your SQL syntax near '(Subject,PostedBy,Date,Message,ReplyID,EmailReply,LastAccessed) VALUES('','','' at line 1
I'm creating here a little bulletin board, and only this thing is slowing me, but badly, down.
Do you have any suggestions, what should here be done otherwise?
Any help will be highly appreciated.
Best greetings,
-0200050- Finland