Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/*******/public_html/******.com/register_confirm.php on line 9 This is line no. 9: $update1 = mysql_query("update register set matriid=concat(prefix,id),age=$_SESSION['Age']") can u tell me what's wrong in this code
it should be this i guess $update1 = mysql_query("update register set matriid=concat(prefix,id),age=$_SESSION['Age']"); php ends with ;
$_SESSION['Age'] - you can't use this in your SQL query ! Try this : $age = $_SESSION['Age']; $update1 = mysql_query("update register set matriid=concat(prefix,id),age='$age'"); PHP: Another thing - what concat(prefix,id) stands for ?
This will fix your error.. $update1 = mysql_query("update register set matriid=concat(prefix,id),age='".$_SESSION['Age']."'") Thanks
or can be $update1 = mysql_query("update register set matriid=concat(prefix,id),age='$_SESSION[Age]'"); PHP:
thanx all for replying the workin code is $update1 = mysql_query("update register set matriid= concat(prefix,id), age= ".$_SESSION['Age'])