When i am sending variables from a form i am getting these three errors:
Undefined index email on line 33
Undefined index message on line 33
Undefined index name on line 33
I would appriciate if someone could help me out.
Here is my code:
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<FORM ACTION = "<? echo $_SERVER['PHP_SELF'] ?>" METHOD = "POST" >
<input type = "text" name = "name" >
<br>
<input type = "text" name = "email" >
<br>
<input type = "text" name = "message" >
<br>
<input type = "submit" namevalue = "send">
</FORM>
<?
if ($_POST){
mysql_connect("localhost", "user", "password") or
die("could not connect");
mysql_select_db("db");
$query = "insert into table(name, email, message text)
values ('$_POST'name']', '$_POST['email']', '$_POST['message']')";
mysql_query($query);
mysql_close();
}
?>
</body>
</html>
Thanx,,, a newbie