Slide 5.2: Fundamental file processing demonstrations (cont.)
Slide 5.4: Entering book information (cont.)
Home

Entering Book Information


These few slides show how to save book information in the file books.txt. The following interface is displayed after the button Enter books is selected in the main interface. This is implemented by the following command:
   system( "/bin/cat  EnterBooks1.html" );
where EnterBooks1.html is the HTML script of this interface, which can be downloaded from the Web by using the View pulldown menu.

  Enter Book Information.

  Title:  

  ISBN:  

  Price:  

  Quantity:  










    Password:                    

The following HTML script is for the top part of this interface:

~wenchen/public_html/cgi-bin/351/week5/EnterBooks1.html
<form method="post"
  action="http://people.cs.und.edu/~wenchen/cgi-bin/351/week5/EnterBooks1.pl">
 <table>
  <tr><th colspan="3">Enter Book Information.</th></tr>
  <tr>
   <td>
     Title:    <input type="text" name="title"    size="50"
        maxlength="50" value="File Structures">
     ISBN:     <input type="text" name="ISBN"     size="12" 
        maxlength="15" value="0201874016">
     Price:    <input type="text" name="price"    size="7"
        maxlength="7"  value="94.80">
     Quantity: <input type="text" name="quantity" size="5"
        maxlength="5"  value="182">
   </td>
   <td>
    <input type="submit" name="act" value="Enter books">
    <input type="submit" name="act" value="Help">
    <input type="submit" name="act" value="Home">
    <input type="reset"             value="Reset">
   </td>
  </tr>
 </table>
</form>