PHP - MySQL - Delete Row

else
    {
    $qry = "SELECT * FROM my_login WHERE email = '".$email."' LIMIT 1";
    $res = mysql_query($qry);
    if(mysql_num_rows($res) > 0)
        {
        echo "Email already exists!";
        }
    else
        {
        $qry="INSERT INTO my_login SET name='$name',city='$city',comment='$comt',password='$pass',email='$email'";
        mysql_query($qry);
        }
    }       
}
?>  

I got it working using this code!

<?php
$id =$_REQUEST['id'];

$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("database", $con);

// sending query
mysql_query("DELETE FROM times WHERE id = '$id'")
or die(mysql_error());      

?>

You used $order instead of your query variable $sql

$sql="DELETE FROM times WHERE id='$id'";
mysql_query($sql);

Tags:

Mysql