I have a form which retrieves various values from my database and displays it in a form. The form contains text boxes, radio, drop down menus. The retrieving part works perfectly and the correct values are displayed for each field. But then when I want to change the field and update the data, it's not updating. Can some please help me with this. Here is my code:
if(isset($_POST['submit'])){
    $sql = "UPDATE tbl_dealer_info ";
    $sql .= "SET phone = '$phone', email = '$email', sfid = '$sfid', ... WHERE id = '$idhidden' ";
    $result = mysqli_query($conn, $sql);
    if(!$result){
        die('Could not update data: '. mysqli_error());
    }
    else{
        echo "Updated Successfully";
    }
}
<input type = "hidden" name = "idhidden" id = "idhidden" value = "" /> // My hidden input to store the id
It displays "Updated Successfully" but isn't actually updating.
 
     
    