I am new to php and have written the following mysql code to enter the details of a new user in the admin subdomain of my website:
$sql = "INSERT INTO 'users' ('userid', 'username', 'upassword')
VALUES ('$_POST['userid']', '$_POST['username']', '$_POST['upassword']')
mysql_query($sq l)";
When I view the code in Internet Explorer I get the following error message:
Parse error: parse error, unexpected T_ENCAPSED_AND_ WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
The error is said to be in the line of code above. Will you please assist me?
$sql = "INSERT INTO 'users' ('userid', 'username', 'upassword')
VALUES ('$_POST['userid']', '$_POST['username']', '$_POST['upassword']')
mysql_query($sq l)";
When I view the code in Internet Explorer I get the following error message:
Parse error: parse error, unexpected T_ENCAPSED_AND_ WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
The error is said to be in the line of code above. Will you please assist me?
Comment