06-02-2005, 02:06 AM
|
#21 (permalink)
|
|
The Acquainted
Join Date: May 2005
Posts: 106
Thanks: 0
|
wait,
this line
<input type="text" FirstName="FirstName">
should be
<input type="text" name="FirstName">
see the difference, same with everyline. name is kind of reserved word and it is to be used as it is. the value inside quotes and after = is the actual value
Database:
NO,
to select database you have to do this
PHP Code:
$con = @mysql_connect("localhost", "dbuser", "dbpassword");
if($con)
{
if(@mysql_select_db('database_name'))
{
$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')";
$result = mysql_query($query);
if ($result)
{
echo <<<EOT
Thank You
Your signup is appreciated.
EOT;
}
else
{
echo mysql_error();
}
}
else
{
echo mysql_error();
}
mysql_close($con);
}
else
{
echo 'Could not connect to database<br>';
}
again check there SHOULD BE NOTHING AFTER EOT;(not even space)
__________________
---------------------------
Errors = Improved Programming.
Portfolio
|
|
|