|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-02 17:29 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 18:00:01 2025 UTC |
Description: ------------ I get the following error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/alinden/public_html/acme/register.php on line 21 I saw where someone else had sent this in with the same problem, but it was an issue of one of the variables being inside quotes and mine is not inside quotes. Any insight you have would be appreciated. Thanks! Reproduce code: --------------- if (!$errors) { mysql_connect('localhost','alinden','freeman')or die(mysql_error()); mysql_select_db('alinden') or die(mysql_error()); $query = "insert into Users (Name, Address, City, State, Zip, Phone, Email, Username, Password, Approved, Admin) values '$Name', '$Address', '$City', '$State', '$Zip', '$Phone', '$Email', '$Username', '$Password', '0', '0'); $result=mysql_query($query) or die(mysql_error()); $_SESSION["success"]= "<p class=\"success\">Registration complete! You will receive a confirmation email when you are approved.</p>"; $destination="template.php"; Header("Location:$destination"); exit; } else { $errors["login"]= "<p class=\"error\">There was an error with your registration. Please try again.</p>"; $Name=""; $Address=""; $City=""; $State=""; $Zip=""; $Phone=""; $Email=""; $Username=""; $Password=""; }