Thank everyone for responding to my post. I finally got the issue resolved. It was so simple. After rewriting the entire code so that it was reporting errors, I received the following message:
"Column count doesn't match value count at row 1"
In the original query it read:
mysql_query("INSERT INTO mailinglist VALUES ('$firstname', '$lastname', '$email', '$ad');
What was happening was that I had omitted the Primary Key. D'oh!!!
Here is the solution to the problem:
mysql_query("INSERT INTO mailinglist VALUES ('', '$firstname', '$lastname', '$email', '$ad')")
or die(mysql_error());
And the entire code looks ike this:
<?php
$firstname = $POST['firstname'];
$lastname = $POST['lastname'];
$email = $POST['email'];
$ad = $POST['adnum'];
$submit = $_POST['submit'];
//Connect to database
mysql_connect("localhost", "*", "") or die(mysql_error());
echo "Connected to MySQL<br />";
mysql_select_db("db_******") or die(mysql_error());
echo "Connected to Database<br>";
if (isset($_POST['submit']))
{
mysql_query("INSERT INTO mailinglist VALUES ('', '$firstname', '$lastname', '$email', '$ad')")
or die(mysql_error());
echo ("<font size=\"+1\">Thank you $firstname $lastname! Your Information Has Been Entered. </font>");
}
else
{
?>
<?
}
?>
Thank you once again every one. 🙂