first problem sorted out. the new problem is...
Undefined index: Name in c:\inetpub\wwwroot\test\script.php on line 18
Undefined index: Email in c:\inetpub\wwwroot\test\script.php on line 19
and nothing gets added to the database. only ID and empty fields. Am I being a Newbie Newbie. Man does this have to be so complicated.
<?
//Our PHP/MYSQL page.
//This script takes the data from the form
//fields and adds them to specified parts
//parts of the database
//MySQL Variables. Edit where necessary
$host = "localhost";
$login_name = "";
$password = "";
//Connecting to MYSQL
MySQL_connect("$host","$login_name","$password");
//Select the database we want to use
MySQL_select_db("asneem1") or die("Could not select database");
//Assign contents of form to variables
$name = $POST['Name'];
$email = $POST['Email'];
//{echo ($name);
//echo $email;
//echo ("$name");}
$sql = "INSERT INTO addressbook SET Email = \"$email\", First_Name = \"$name\"";
$result = mysql_query($sql);
//Code to check if statement executed properly and display message
if ($result) {
echo("Email and Name successully added");
} else {
echo("An error has occured");
}
//Close connection with MySQL
MySQL_close()
?>