From:             angela dot linden at atu dot edu
Operating system: Windows
PHP version:      4.4.4
PHP Bug Type:     Compile Failure
Bug description:  Error message 

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=""; 
        }


-- 
Edit bug report at http://bugs.php.net/?id=39347&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39347&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39347&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39347&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39347&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39347&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39347&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39347&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39347&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39347&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39347&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39347&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39347&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39347&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39347&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39347&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39347&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39347&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39347&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39347&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39347&r=mysqlcfg

Reply via email to