PHP MYSQL:删除用户[关闭]

I have a form that, when submitted, will delete a users profile by processing deleteuser.php.

<form method='post' action='deleteuser.php'>
    <input type='submit' name='delete' value='Delete Profile'>

And here is the deleteuser.php

session_start();
include("config.php");

if(isset($_POST['submit'])){

    $id = $_SESSION['uid'];    

    $sql = "DELETE from users WHERE id='$id'";
    mysql_query($sql) or die(mysql_error());
    echo "User has been sucessfully deleted!";
}
else{
    echo "ERROR: User was not deleted";
}

Now I am only getting "User was not deleted".

Any idea why?

As said by @showdev, form post data associated with their name tag, i.e. since

<input type='submit' name='delete' value='Delete Profile'>

as name tag set to "delete", you must access it via $_POST['delete']