Hello,
I hope someone can help a new quy with a coding problem. I want to send data from a form to a table.I get my "It works" message but the data is not in the table.
Here is the code I used. The table fields are the same as the VALUE data.
Thanks for any help.
Richard
<?
$dbh=mysql_connect ("localhost","username","password") or die ("Unable to connect!");
mysql_select_db(databasename);
$name1 = "fname";
$name2 = "lname";
$name = "prospect_name";
$email = "email";
$time_zone = "time_zone";
$time = "time";
$day = "day";
$month = "month";
$phone_number = "phone_number";
$result = mysql_query ("INSERT INTO (tablename)(fname,lname,prospect_name,email,time_zone,time,day,month) VALUES ('$name1','$name2','$name','$email','$time_zone','$time','$day','$month','$phone_number')
");
if (!result)
{
echo "It Did'nt work: ", mysql_error();
exit;
}
else
{
print (" It Worked.");
}
?>