Code: Select all
echo '</td><td>';
echo '<a href="delete_contact.php">Delete Record</a>';
echo '</td></tr>';Code: Select all
<?
//create variables
$id=$_POST['delete'];
//connect to DB and insert data
mysql_connect("localhost", "ci_rod", "rod") or die('I cannot connect to data base because: '.mysql_error());
mysql_select_db("ci_testing") or die(mysql_error());
mysql_query("DELETE FROM `ci_testing` WHERE id=$id");
Print "Your information has been successfully deleted from the database.";
echo '<center>';
echo '<p><a href="phonelist.php">Back to Phone List</a></p>';
echo '</center>';
?>