I'm making a address book in php / sql / ajax currently I have this :
 $.ajax({
                    url: "select.php",
                    dataType: "html",
                    type: "post",
                    data: {
                        "id": id
                    },
                    success: function(Result) {
                        $('#result').html(Result);
                    }
                });
but my problem is to edit the contact inforamtions. in the select.php which get the contact id to select from the db and display it, I added many textbox allowing us to edit the datas but when i press the button submit it doesn't do anything.
`
if(isset($_POST['update']))
{
    $prenom=$_POST["prenom"];
    $nom=$_POST["nom"];
    $tel=$_POST["tel"];
    $ville=$_POST["ville"];
    $email=$_POST["email"];
    //$q= "UPDATE `flexyperso`.`ca11` SET `prenom` = '".$name."', `nom` = '".$nom."', `tel` = '".$tel."', `ville` = '".$ville."', `email` = '".$email."' WHERE contact_id = '2'";
    echo "button pressed ";
    mysql_query($q);
}
`
Does anyone know why the button detection don't work ?

 
     
    