PDA

View Full Version : Unexpected T_STRING?


traekwon
08-02-2002, 04:38 PM
Can anyone tell me why I'm getting a PARSE error, Unexpected T_STRING on this line?

$pmgiveuser = $DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,messageread,folderid) VALUES (NULL,'$thread[postuserid]','$thread[postuserid]','$originatinguser','adskasfjsaf','".addslashes($pmgivemessage)."',".time().",0,0)");

Logician
08-05-2002, 09:45 AM
Use:


$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,messageread,folderid) VALUES (NULL,'$thread[postuserid]','$thread[postuserid]','$originatinguser','adskasfjsaf','".addslashes($pmgivemessage)."',".time().",0,0)");

instead.

You are using an INSERT command, not SELECT, so why to assign the result to a variable ($pmgiveuser)?