in reply to Writing a web message board from scratch
on your html form you need to a comand that accesses the perl script. it should look something like thisuse CGI; $query = new CGI; # start the html output print STDOUT $query -> header(); print STDOUT $query -> start_html ( -title=> "Message board.cgi", -BGC +OLOR=>"yellow"); print STDOUT "\n<h1><align=center>PUT YOUR TITLE HERE</CENTRE></H1>\n" +; # retrive info from the html form using he param function # e.g $people = $query ->param ('people'); # do this for all your variables # design some failsafes using perls regular expressions so that # if nothing has been entered in the message box they get a warning # message if ($message !~/\w+/) { print STDOUT "<P> you have not entered a message\!\n"; print STDOUT $query -> end_html; exit (0); }
Hope this was what you were after. Lolly :)<form method ="post" action ="http://www.whereever/directory/myCGI.cgi" enctype="multipart/form-data">
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Writing a web message board from scratch
by Dogma (Pilgrim) on Apr 20, 2002 at 03:15 UTC |