Jump to content

PHP session variables


estrangedfellow

Recommended Posts

Hiya. I was wondering if you guys can help me on a problem I have been having with PHP session variables.

I am trying to use a session variable I created called username in an sql query. The error I have is;

 

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/st622/public_html/cw/editconfirm.php on line 25

 

Line 25;

 

$sql1 = ("UPDATE Dealers SET LName='$LName', FName='$FName', UserName='$UserName, Password=password('$Password'), Email='$Email' WHERE UserName=($_SESSION['username'])");

 

Essentially, what I’m trying to do is get the query to show one record. That record is the details of the user who is currently logged on. The data will then appear in a form. This form will allow the user to edit their data.

 

What I am doing wrong here? Any pointers or guidance would be really appreciated.

Thanks.

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/196287-php-session-variables/
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.