Delete values from database


use the code for delete dat from database . the file name delete.php

<html>
<head>
<meta>
<title>delete</title>
<?php
include(“db.php”);
$id=$_GET[‘id’];
echo $id;
?>

<?php
if (isset($_GET[‘id’]))
{
$query=”delete from record where id=’$id'”;
if(mysql_query($query))
{
header(‘location:usingquery.php’);
}
else
{
echo mysql_error();
}
}
if(isset($_POST[‘no’]))
{
header(‘location:usingquery.php’);
}
?>
</body>
</html>

Leave a comment