I am running this piece of code, it is working as expected but giving notices:-
<!DOCTYPE>
<?php 
 $db= mysqli_connect("localhost","root","","php") or die ("Connection wrong!");
?>
<html>
<body>
    <form method="POST" action="db.php">
        <input type="text" name="name" placeholder="Enter name here"></br>
        <input type="password" name="pass" placeholder="Enter pass here"></br>
        <input type="text" name="email" placeholder="Enter email here"></br>
        <input type="submit" name="sub" value="Insert">
    </form>
<?php
    if(isset($_POST['sub'])){
            $name = $_POST['name'];
            $pass = $_POST['pass'];
            $email = $_POST['email'];
    }
    $insert = "insert into users (name,pass,email) values ('$name','$pass','$email')";
    $run = mysqli_query($db,$insert);
    if($run){
        echo "<h3> Reg Success!!<h3>";
    }
?>
<br/>
<table width="500" bgcolor="orange" border="2">
    <tr>
        <th>S.N</th>
        <th>Name</th>
        <th>Password</th>
        <th>Email</th>
        <th>Edit</th>
        <th>Delete</th>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
</table>
</body>
</html>
Its working but with these notice, the line no indicating to the line where $insert is being declared. What might causing this? :-

 
     
     
     
     
    