title: how to merge register.php to html
body: <p>I'm trying to create a user system for my website. So I successfully made a register.php.</p>
  
  <pre><code>&lt;?php
  // dbConfig.php is a file that contains your
  // database connection information. This
  // tutorial assumes a connection is made from
  // this existing file.
  include ("dbConfig.php");
  //Input vaildation and the dbase code
  if ( $_GET["op"] == "reg" )
   {
   $bInputFlag = false;
   foreach ( $_POST as $field )
    {
    if ($field == "")
     {
     $bInputFlag = false;
     }
    else
     {
     $bInputFlag = true;
     }
    }
   // If we had problems with the input, exit with error
   if ($bInputFlag == false)
    {
    die( "Problem with your registration info. "
     ."Please go back and try again.");
    }
   // Fields are clear, add user to database
   //  Setup query
   $q = "INSERT INTO `umass` (`email`,`password`,`school`) "
    ."VALUES ('".$_POST["email"]."', "
    ."PASSWORD('".$_POST["password"]."'), "
    ."'".$_POST["school"]."')";
   //  Run query
   $r = mysql_query($q);
  
   // Make sure query inserted user successfully
   if ( !mysql_insert_id() )
    {
    die("Error: User not added to database.");
    }
   else
    {
    // Redirect to thank you page.
    Header("Location: register.php?op=thanks");
    }
   } // end if
  //The thank you page
  elseif ( $_GET["op"] == "thanks" )
   {
   echo "&lt;h2&gt;Thanks for registering!&lt;/h2&gt;";
   }
  
  //The web form for input ability
  else
   {
   echo "&lt;form action=\"?op=reg\" method=\"POST\"&gt;\n";
   echo "Email Address: &lt;input name=\"email\" MAXLENGTH=\"30\"&gt;&lt;br /&gt;\n";
   echo "Password: &lt;input type=\"password\" name=\"password\" MAXLENGTH=\"16\"&gt;&lt;br /&gt;\n";
   echo "School: &lt;input name=\"school\" MAXLENGTH=\"30\"&gt;&lt;br /&gt;\n";
   echo "&lt;input type=\"submit\"&gt;\n";
   echo "&lt;/form&gt;\n";
   }
  // EOF
  ?&gt;
  </code></pre>
  
  <p>It works. When i try to migrate my code to my html
  i receive this error. </p>
  
  <pre><code>die("Error: User not added to database.");
  </code></pre>
  
  <p>HTML CODE</p>
  
  <pre><code>&lt;div id="register"&gt;
  register.php code here
  &lt;/div&gt;
  </code></pre>
  
  <p>PS I edited my htaccess to run php script with html extension.</p>
  
  <p>Thank You</p>