I created a that submits straight into A database example with a table in the database named validation. After the form it’s been submitted I retrieve the data submitted from the database. I had no problems with the retrieving of data from the Database to a page I created and named it Receive.php. I created a Do While Loop , so that every row of data will have a delete Button and an Edit button. The problem am facing is my delete button don’t seem to be functioning and I also want to use PhP only in making it work thus no JavaScript or jquery etc would or should be used.
[size=12pt]My code is as follows :[/size]
[php] <?php
include 'sql.php';
$query = "SELECT * FROM validation";
mysqli_query($con , $query);
$result = mysqli_query($con , $query);
$tottals = mysqli_num_rows($result);
if (isset($_POST['del'])){
$id = mysqli_real_escape_string($_POST['ID']);
$query1 = "DELETE FROM validation WHERE ID = '$id' ";
$results = mysqli_query($con , $query1);
}
?>
Full Name | Email Address | Website | Comment | Time |