zgkhoo Posted August 18, 2007 Share Posted August 18, 2007 $sql="INSERT INTO person (Username) VALUES ('$_SESSION["usename"]'); error msg= Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\register3.php on line 67 if i change '$_SESSION["username"]' to '$_POST[username]' then no error at all but if i change back to '$_SESSION["username"]' then error msg occur..why? thanks. Link to comment https://forums.phpfreaks.com/topic/65575-solved-session-data-cant-save-into-mysql/ Share on other sites More sharing options...
suma237 Posted August 18, 2007 Share Posted August 18, 2007 try this $_SESSSION['username'] Link to comment https://forums.phpfreaks.com/topic/65575-solved-session-data-cant-save-into-mysql/#findComment-327389 Share on other sites More sharing options...
suma237 Posted August 18, 2007 Share Posted August 18, 2007 $s=$_SESSION["usename"]; $sql="INSERT INTO person (Username) VALUES ('$s'); Link to comment https://forums.phpfreaks.com/topic/65575-solved-session-data-cant-save-into-mysql/#findComment-327391 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.