How To Delete Data In Mysql Using PHP
How To Delete Data In Mysql Using PHP
In this tutorial, we will learn how to delete the record or data in PostgreSQL using PHP.
Code for data deletion from the database. Put this code on top of the delete.php file.
<?php include_once('config.php');
if(isset($_GET['deleteid']))
{
$did=intval($_GET['deleteid']);
$sql=pg_query($conn,"delete from employee where ID=$did");
echo "<script>alert('Data deleted Sucessfully');</script>";
echo "<script>window.location.href = 'read.php'</script>";
}
?>
How To Delete Data In Mysql Using PHP
How To Fetch Data In My Sql Using PHP