I don't understand why my data is not inserting on the database. Please help me. i use a single page where html and php are on the same page. i tried it so many times but data is not inserting.
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Quickstart pack</title>
    </head>
    <body>
    <form action="index.php" method="post">
        Name: <input type="text" name="name"/></br>
        Email: <input type="text" name="email"/></br>
        Phone: <input type="text" name="phone"/></br>
        <input type="submit" value="submit"/>
    </form>
<?php
if(isset($_POST['submit'])) {
    $conn = mysql_connect("localhost", "root", "");
    if (!$conn) {
        die("mysql is not connected" . mysql_error());
    }
    $data = mysql_select_db("customerInfo", $conn);
    $sql = "INSERT INTO customer (Name, Email_id, Phone) VALUES ('$_POST[name]','$_POST[email]','$_POST[phone]')";
    mysql_query($sql, $conn);
    mysql_close($conn);
}
?>
    </body>
</html>
 
     
     
     
    