[Solved] Insert form into database [closed]


You need inputs on your form:

 <form action="insert.php" method="post">
       Username: <input type="text" name="username">
       Password: <input type="password" name="password"> 
       Confirm Password: <input type="password" name="confirm">
       <input type="submit" name="submit">
     </form>

Then on insert.php

if (isset($_POST['submit'])){
  $Error = 0;
 if (!isset($_POST['username'])){
  $Error++;
 }
 if (!isset($_POST['password'])){
  $Error++;
 }
 if (!isset($_POST['confirm'])){
  $Error++;
 }

 if ($Error > 0){
  echo "Error in HTML Validation";
  exit; 
 }


// continue post verification here. 

}

solved Insert form into database [closed]