Jump to content

HELP - Inserting two same variables into the same row of DB


spaceman12

Recommended Posts

how do i insert two same values bearing variable into the same row though different column into a database? Insertion was successful but at the end I always end up getin an error for which I was not allowed a redirection...thanx

 

 

error:

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 ') VALUES('spaceman12', 'ja')' at line 1

$insertMES="INSERT INTO messaging( Date, Time, Subject, Message, From_User, To_User, Message_Alert, IP, Sender)
            VALUES( '".$date."',  '".$time."', '".mysql_real_escape_string($subject)."', '".mysql_real_escape_string($message)."', '".$_SESSION['Username']."', '".$send_to."', '".mysql_real_escape_string($message_alert)."', '".$IP."', '."$_SESSION[username]."')";
            
mysql_query($insertMES);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.