This is a pretty simple script for a basic survey to collect data on political issues.
I was able to get rid of all the errors, but when I test it and look in the table, there is no data?
Here is the code, any help would be appreciated....
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
if (!$dbh)
{
die('Could not connect: ' . mysql_error());
}
else echo ("Looks good!");
mysql_select_db("Tpowell03", $dbh);;
$religionlevel = $POST["radiogroup1"];
$left_right = $POST["radiogroup2"];
$abortion = $POST["radiogroup3"];
$vote = $POST["radiogroup4"];
$rich = $POST["radiogroup5"];
$salary = $POST["radiogroup6"];
$mother = $POST["radiogroup7"];
$father = $POST["radiogroup8"];
$email = $_POST["Email"];
mysql_query ("INSERT INTO survey (Religionlevel,left_right,abortion,vote,rich,salary,mother,father,email)
VALUES('$religionlevel','$left_right','$abortion','$vote','$rich','$salary','$mother','$father','$email')");
?>