06-01-2005, 11:53 PM
|
#1 (permalink)
|
|
The Wanderer
Join Date: Jun 2005
Posts: 13
Thanks: 0
|
Trying to create a "sign up form"....help please
I am trying to create a sign up form and this is the error I keep getting:
Parse error: parse error, unexpected $ in /XXXX/XXXXX/public_html/signup/signup.php on line 37
I have been doing some searching and found that it seems to be a sytax error of some sort but I can't find the problem. Maybe a second or third set of eyes can help. Here's the source code:
<?php
$FirstName = $_GET["FirstName"];
$LastName = $_GET["LastName"];
$Email = $_GET["Email"];
$Phone = $_GET["Phone"];
$Address = $_GET["Address"];
$City = $_GET["City"];
$State = $_GET["State"];
$Zip = $_GET["Zip"];
$Username = $_GET["Username"];
$Password = $_GET["Password"];
$LastLogin = date("Y-m-d");
print "FirstName is $FirstName<br>\n";
print "Email is $Email<br>\n";
mysql_connect("localhost", "dbname", "dbpassword");
$result = mysql_query(
"insert into dbname.dbtable
(FirstName, LastName, Email, Phone, Address, City, State, Zip, Username, Password, LastLogin) values
('$FirstName', '$LastName', '$Email', '$Phone', '$Address', '$City', '$State', '$Zip', '$Username', '$Password', '$LastLogin')"
);
if ($result) {
echo <<<EOT
Thank You
Your signup is appreciated.
EOT;
} else {
echo "Something went awry with the awful SQL";
}
mysql_close();
?>
If someone could look over this and tell me what I'm doing wrong I'd appreciate it....
|
|
|
|