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. Quote 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'] Quote 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'); Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.