<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//NL">
<HTML>
   <HEAD>
      <TITLE>
      Bottom
      </TITLE>
   </HEAD>
<BODY>
<CENTER>

<?php
   if ($_POST['submit']) {
       $phonenr = $_POST['number'];
       $name = $_POST['callername'];
       include ("config.php");
       $db = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error());
       mysql_select_db($dbname) or die(mysql_error());
       $query = "INSERT INTO names(phonenr, name) VALUES('$phonenr','$name')";
       mysql_query($query) or die(mysql_error());
       mysql_close($db);
       ?>
       <pre>
         Name:<b> <?print "$name";?></b><br>
       Number:<b> <?print "$phonenr";?></b><br>
       <br><br></pre><?
       print "The Name and Number have been added to the database.\n";
   } else {
?>
<CENTER>
<form action="names-add.php" method="post">
 Please give the Phone Number and the Name that you want to add.<br>
 <br>
 Phone Number:
 <input type="text" name="number" size="10" maxlength="10">
 <br>
 Name:
 <input type="text" name="callername" size="30" maxlength="75">
 <br>
 <input type="submit" value=" Add " name="submit">
</form>
<?php
   }
?>

</CENTER>
</BODY>
</HTML>
