php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39347 Error message
Submitted: 2006-11-02 17:26 UTC Modified: 2006-11-02 17:29 UTC
From: angela dot linden at atu dot edu Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.4.4 OS: Windows
Private report: No CVE-ID: None
 [2006-11-02 17:26 UTC] angela dot linden at atu dot edu
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=""; 
        }


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-02 17:29 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Aug 23 21:00:02 2025 UTC