this is my HTML code:
    <!doctype html>
    <html lang="fr">
    <head>
    <meta charset="utf-8">
    <title>supprimer un moyen</title>
    <link rel="stylesheet" href="style.css">
    </head>
    <body class="example">
    <br><br><br>
    <form name="f" method="post" action=" supprimer_moyen.php ">
    <center><b><h1>supprimer un moyen</h1> </b>
    <label>    Entrer le code du moyen :   </label>
    <input type="text" name="code_moy" value="" placeholder="Code" required> 
       <input id="gobutton" type="submit" name="sup" value="Supprimer"><br><br>
    </center>
    </form>
    </body>
    </html>
and this is my php code:
<?php
if (isset ($_POST['sup']))
{
    $code_moy= $_POST["code_moy"];
    $con=mysql_connect("localhost","root","") or die("Echec de connexion au serveur.".mysql_error()); 
    mysql_select_db("ttp",$con) or die("Echec de sélection de la base.".mysql_error());
    $sql = "delete from moyen_transport where ID='$code_moy'";
    if (mysql_query($sql))
        {
         echo '<br>';   
         echo '<h1><center><font color="white"> suppression avec succès <font></center> </h1>';
         echo '<center><a href="supprimer_moyen.html" ><img src="images/precedent-icone-5823-128.png" width="120px" height="70px" alt="Accueil"></a></center>';
    }
    else
    {       
            echo '<br>';
            echo '<h1><center><font color="red"> ce moyen n\'éxiste pas <font></center> </h1> ';
            echo '<center><a href="supprimer_moyen.html" ><img src="images/precedent-icone-5823-128.png" width="120px" height="70px" alt="Accueil"></a></center>';
    }
    mysql_close();
}   
?>
My problem is that no matter what i enter in input the php result is always "suppression avec succès" even if the "ID" dosen't exist in my database!!!
 
     
    