TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 06-01-2005, 11:53 PM   #1 (permalink)
The Wanderer
 
Join Date: Jun 2005
Posts: 13
Thanks: 0
RogueDogg is on a distinguished road
Default 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....
RogueDogg is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:45 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design