<?php
           //if any of the two fields is left blank, don't send data, but send an error message.
           if(!($description=="") || !($URL==""))
           {
 
              //connects to database  server
              mysql_connect(myserver, myusername, mypassword);
 
              //connects to the database
              mysql_select_db('mydatabase');
 
              //this is the query command to insert into the bookmark 
              // table the values from $description and $URL
              // inside the Columns description and URL
              mysql_query("insert into bookmark(description, URL) values ('$description', '$URL')");
 
              //closes connection to database.
              mysql_close();
 
              //After the data is inserted, the browser will form a web page with 
              // the following information.
              echo "Thanks for adding the bookmark<br>";
              echo "<a href=book.php3>View BookMraks</a><br>";
              echo "<a href=sendbook.html>Add Another One</a><br>";
            }else{
              echo "You need to go to the form: <a href=sendbook.html>Sendbook</a>";
            }
?>