View Single Post
Old 06-02-2005, 02:52 AM   #22 (permalink)
RogueDogg
The Wanderer
 
Join Date: Jun 2005
Posts: 13
Thanks: 0
RogueDogg is on a distinguished road
Unhappy

Ok so I kinda get the <input type="text" FirstName="FirstName">
should be
<input type="text" name="FirstName">

Does that mean <input type="text" name="LastName"> is ok? at what point do you NOT use name?


----- ERROR START -----
Parse error: parse error, unexpected $ in /XXXX/XXXXXXXX/public_html/signup/signup.php on line 42
----- ERROR END ------

Line 42 is the last line in the script ( ?> ) GRRRR back to square one it looks like, hehe

Here's my current code:
PHP Code:
<?php
error_reporting
(E_ALL); 
    
$FirstName = (isset($_GET["FirstName"]))?mysql_escape_string($_GET["FirstName"]):'';//use this function on all the input before storing it in database 
    
$LastName = (isset($_GET["LastName"]))?mysql_escape_string($_GET["LastName"]):''
    
$Email = (isset($_GET["Email"]))?mysql_escape_string($_GET["Email"]):''
    
$Phone = (isset($_GET["Phone"]))?mysql_escape_string($_GET["Phone"]):''
    
$Address = (isset($_GET["Address"]))?mysql_escape_string($_GET["Address"]):''
    
$City = (isset($_GET["City"]))?mysql_escape_string($_GET["City"]):''
    
$State = (isset($_GET["State"]))?mysql_escape_string($_GET["State"]):''
    
$Zip = (isset($_GET["Zip"]))?mysql_escape_string($_GET["Zip"]):''
    
$Username = (isset($_GET["Username"]))?mysql_escape_string($_GET["Username"]):''
    
$Password = (isset($_GET["Password"]))?mysql_escape_string($_GET["Password"]):''
    
$LastLogin date("Y-m-d"); 
    print 
"FirstName is $FirstName<br>\n"
    print 
"Email is $Email<br>\n"

    
$con = @mysql_connect("localhost""cashflow_dbuser""dbpwd"); 
    if(
$con
    {
        if(@
mysql_select_db('cashflow_members')) 
        { 
            
$query "insert into cashflow_members.client (FirstName, LastName, Email, Phone, Address, City, State, Zip, Username, Password, LastLogin)"
             
"values('$FirstName', '$LastName', '$Email', '$Phone', '$Address', '$City', '$State', '$Zip', '$Username', '$Password', '$LastLogin')"
        
$result mysql_query($query); 
        if (
$result
        { 
            echo <<<EOT
Thank You
Your signup is appreciated.
EOT;

        else 
        { 
            echo 
mysql_error(); 
        } 
        
mysql_close($con); 
    } 
    else 
    { 
        echo 
'Could not connect to database<br>'
    } 
?>
RogueDogg is offline  
Reply With Quote