Link to home
Create AccountLog in
Avatar of Sim1980
Sim1980

asked on

PHP Parse error

Hi all.

I get the following error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

It is in the code below:

$sql="INSERT INTO $tbl_name(Builder, Community, Slabs, DriedIns, UserID,CreateDate)VALUES('$Builder', '$Community', '$Slabs','$DriedIns',$_SESSION['myusername'],CURRENT_TIMESTAMP)";

Open in new window


I think it's where I'm trying to save the session username in the table.

Any idea what I'm doing wrong?

Thank you in advance.
ASKER CERTIFIED SOLUTION
Avatar of Jagadishwor Dulal
Jagadishwor Dulal
Flag of Nepal image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer