1. log-in to sunburst
    enter user name and password
  2. cd www (change directory to your web directory)
  3. mkdir todaysdemo (create new directory)
  4. chmod 755 todaysdemo (change permissions)
  5. cd todaysdemo (change directory)
  6. display the cgi-lib.pl in netscape and copy to clipboard
  7. back to the telnet to sunburst session
  8. pico cgi-lib.pl (edit new file)
  9. paste (from menu - the file in the clipboard)
  10. control-x (save and exit)
  11. chmod 700 cgi-lib.pl (change permissions to file)
  12. pico add2.html
  13. <html> <head> <script language=javascript> function addit(form){ var num1=form.field1.value var num2=form.field2.value wow=eval(num1)+eval(num2) form.adds.value=wow } </script> </head> <body> <form name=addition method=get> <input type=text name=field1 size=5> <input type=text name=field2 size=5> <INPUT type="button" onClick="addit(this.form),this" value="add em up"> <input type=reset> <input type=text size=5 name="adds"> </form> </body> </html>
  14. chmod 755 add2.html (change permissions)
  15. view in netscape
  16. pico add.pl
  17. #!/usr/local/bin/perl push(@INC,"/usr/local/etc/httpd/cgi-bin"); require("cgi-lib.pl"); &ReadParse; $crlf="\r\n"; $number1=$in{'field1'}; $number2=$in{'field2'}; $total=$number1+$number2; print "content-type: text/html$crlf$crlf"; print "<html><head><title>results of input</title></head>"; print "the total of $number1 and $number2 is $total";
  18. chmod 755 add.pl
  19. add.pl field1=3 field2=8
  20. pico add.html
  21. <html> <head> <title> sample cgi-bin </title> </head> <body> <h2>Add two numbers together</h2> <form method = "post" action="add.pl"> <input name=field1 type=text size=5> <input name=field2 type=text size=5> <input type=submit value="and the sum is"><input type=reset> </body> </html>
  22. chmod 644 add.html
  23. view page in netscape