Jump to content

[SOLVED] session data cant save into mysql


zgkhoo

Recommended Posts

$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

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.