it says the error is on line 29???? im lost. :eek:
<?php
/*Program: email.php
*Desc: PHP program that sends an email address to the DB for a mailing list.
*/
if(ini_get("magic_quotes_gpc") == "1")
{
$_POST['email'] = stripslashes($_POST['email']);
}
$host="localhost";
$user="removed";
$password="removed";
if(!empty($_POST['form']))
{
mysql_connect($host,$user,$password);
mysql_select_db(thinksna_email);
$result = mysql_query($_POST['email']);
if($result == false)
{
echo "<h4>Error: ".mysql_error($cxn)."</h4>";
}
else
{
$email = $_POST['email'];
INSERT INTO email (email, email_id, dateTime) VALUES ('$email', "" , NOW());
echo "'$email' was added to the list";
}
?>
and here is the html form too:
<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en">
<meta http-equiv="Content-Type" content="text/html"; charset="UTF-8" />
<head>
<title>thinksnack.com</title>
<link rel="stylesheet" type="text/css" href="web.css">
<link rel="Shortcut Icon" type="image" href="favicon.ico">
</head>
<body>
<form action="email.php" method="POST">
<input type="text" email="email">
<input type="submit" value="add my e-mail">
</form>
</body>
</html>
thanks for helping if you can.