hi all! i have here a code to delete a record
<?php
define ('DB_NAME', 'vincegac_vince');
define ('DB_USER', 'root');
define ('DB_PASSWORD', '');
define ('DB_HOST', 'localhost');
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$db_selected = mysql_select_db(DB_NAME, $link);
if (!$db_selected) {
die('Can\'t use ' . DB_NAME . ': ' . mysql_error());
}
$value1 = $_POST["emp_number"];
$value2 = $_POST["fname"];
$value3 = $_POST["mname"];
$value4 = $_POST["lname"];
$value5 = $_POST["homeadd"];
$value6 = $_POST["emailadd"];
$value7 = $_POST["ofcnum"];
$value8 = $_POST["mobilenum"];
$value9 = $_POST["homenum"];
$value10 = $_POST["position"];
$value11 = $_POST["practice"];
$value12 = $_POST["projname"];
$value13 = $_POST["projmgr"];
$value14 = $_POST["teamlead"];
$sql = "DELETE FROM employee WHERE emp_number = '$value1' AND fname = '$value2' AND mname = '$value3' AND lname = '$value4' AND homeadd = '$value5' AND emailadd = '$value6' AND ofcnum = '$value7' AND mobilenum = '$value8'
AND homenum = '$value9' AND position = '$value10' AND practice = '$value11' AND projname = '$valu12' AND projmgr = '$value13' AND teamlead = '$value14'";
if (!mysql_query($sql)) {
die('Error: ' . mysql_error());
}
//echo '<p>One member added! <a href="demo-form.php">add another member</a></p>';
echo '<p>Back to <a href="main.php">Home page</a></p>';
mysql_close();
?>
but when i click my delete button, it says, undefined index. im using post method.
Thanks!