How to use Guestbook

Log in to host online using Telnet

Copy the Guestbook CGI files

  1. At the % prompt, type: cd /var/dancing/cgi-dist/guestcgi. Press enter.
  2. At the % prompt, type: copyguest. Press enter.
  3. You will see lines similar to the lines below:

    /afs/sfsu.edu/usr/mrito/public_html

    make a note of the path to your files listed above

    now you need to customize the guestbook.cgi for your account

    to customize the file use an editor like pico or vi

    Ex (at the server prompt type): pico -w guest/guestbook.cgi

  4. Make a note of the directory path listed above (i.e., /afs/sfsu.edu/usr/mrito/public_html).
  5. At the % prompt, type: cd ~userid/public_html/guest where userid is your Internet Account username (i.e., ~mrito/public_html/guest) and press enter.

Edit the guestbook.cgi file

  1. At the % prompt, type: pico -w guestbook.cgi
  2. Using the down arrow key, scroll through the file until you see these lines:

    $guestbookreal = "/afs/sfsu.edu/fn/userid/public_html/guestbook/guestbook.html";

    $guestlog = "/afs/sfsu.edu/fn/userid/public_html/guestbook/guestlog.html";

  3. Using the arrow keys to move around, change the paths according to the directory you noted above. For example, my directory was /afs/sfsu.edu/usr/mrito/public_html so I would edit the lines to read:

    $guestbookreal = "/afs/sfsu.edu/usr/mrito/public_html/guestbook/guestbook.html";

    $guestlog = "/afs/sfsu.edu/usr/mrito/public_html/guestbook/guestlog.html";

    Note:The only values you will need to change are fn and userid.

  4. Press CTRL and O at the same time.
  5. Press enter when you see 'File Name to write: guestbook.cgi'. It will say 'Wrote 378 lines' at the bottom of the screen.
  6. Press CTRL and X at the same time.
  7. At the % prompt, type exit.

Test Guestbook

  1. Open an Internet browser like Netscape and open the URL: http://online.sfsu.edu/~userid/guest/ where userid is your Internet Account username (i.e., ~mrito/guest).
  2. An index of files will be listed. Click addguest.html.
  3. Complete the form and click the button Submit Query.
  4. After submitting the form, you will see a page that says: "Thank You For Signing The Guestbook".