sirborder
02-21-2007, 11:03 PM
Ok,
I have a form that lets people sign up for my services, then it gets inserted into a MYSQL database. The person fills out the form thens submits, but there is an error on the form action page. On line 50
Here is the code.
<?
$user="databaseuser";
$password="databasepass";
$database="databasename";
$host="localhost";
$first=$_POST['firstname'];
$last=$_POST['lastname'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$mobile=$_POST['mobile'];
$address=$_POST['address'];
$city=$_POST['city'];
$state=$_POST['state'];
$zip=$_POST['zip'];
mysql_connect($host,$user,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query= "INSERT INTO contacts VALUES('','$first','$last','$email','$phone','$mobile','$address','$city','$state','$zip')";
mysql_query($query);
echo("Thank you for signing up. You will recieve an email when your submision is reviewed.")
mysql_close() <---line 50
?>
the form is at http://www.surfacehawaii.com/kylecaleb/packages/signup.php
I have a form that lets people sign up for my services, then it gets inserted into a MYSQL database. The person fills out the form thens submits, but there is an error on the form action page. On line 50
Here is the code.
<?
$user="databaseuser";
$password="databasepass";
$database="databasename";
$host="localhost";
$first=$_POST['firstname'];
$last=$_POST['lastname'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$mobile=$_POST['mobile'];
$address=$_POST['address'];
$city=$_POST['city'];
$state=$_POST['state'];
$zip=$_POST['zip'];
mysql_connect($host,$user,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query= "INSERT INTO contacts VALUES('','$first','$last','$email','$phone','$mobile','$address','$city','$state','$zip')";
mysql_query($query);
echo("Thank you for signing up. You will recieve an email when your submision is reviewed.")
mysql_close() <---line 50
?>
the form is at http://www.surfacehawaii.com/kylecaleb/packages/signup.php