RSS Forums RSS
Please support our Perl advertiser: Programming Forums
Views: 14348 | Replies: 3 | Thread Tools  Display Modes
Reply
Join Date: Apr 2005
Posts: 8
Reputation: sydneyrustle is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sydneyrustle sydneyrustle is offline Offline
Newbie Poster

guestbook cgi script won't return reply page????

  #1  
Sep 6th, 2005
Hi all,
just need some help on my coding. I cant figure out what i'm doing wrong as far as i can see it should be working....
It s a very basic guestbook form and the cgi script seems to work but for some reason my reply page won't show up????

the form:
<html>
<head></head>
<body bgcolor="#ffffff">

<h1>A Simple Guestbook</h1>

<form method="post" action="first.cgi">

<h4>Name</h4>
<p><input name="name" type="text" size="50" 

value="Random Person">

<h4>Email</h4>
<p><input name="email" type="text"  size="50" 

value="someone@someplace.com.au">

<h4>Your Comments</h4>
<p>
<textarea name="comment" rows="3" cols="50" 

wrap="virtual">
Enter text here...
</textarea>

<p><input type="submit" value="Submit"> 
<input type="reset"  value="Clear Form">

</form>
</body></html>

the cgi script:
#!/usr/bin/perl
#   Guest book reply and storage script
#
#   Start by defining the source and target
source	reply.tpl
target	STDOUT
open	all
# Define default values for the variables
var	name	Fred Nurk
var	comment	Hello World
var	email	fnurk@csu.edu.au
# Now do the processing
form
cgi
xmlsub
#  Close the files 
close	source
# The following lines write the data to a file
source	guestbook.tpl
target	data.xml
open	all
xmlsub
close	all
#
# End of the guestbook script

If any one can help me out, it would be much appreciated.

Cheers
syd
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2005
Location: Cambridge, MA
Posts: 1,374
Reputation: Rashakil Fol has a spectacular aura about Rashakil Fol has a spectacular aura about 
Rep Power: 7
Solved Threads: 47
Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Salamander Man

Re: guestbook cgi script won't return reply page????

  #2  
Sep 6th, 2005
That's not a perl script; that's a bunch of tab separated values.
Reply With Quote  
Join Date: Apr 2005
Posts: 8
Reputation: sydneyrustle is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sydneyrustle sydneyrustle is offline Offline
Newbie Poster

Re: guestbook cgi script won't return reply page????

  #3  
Sep 6th, 2005
is it?? i'm don't really know what i'm doing either way... thats how my teacher tells me its done (atleast something like that)
don't surpose you can tell me how to write a cgi script for a guestbook then??

cheers
syd
Reply With Quote  
Join Date: Jun 2005
Location: Cambridge, MA
Posts: 1,374
Reputation: Rashakil Fol has a spectacular aura about Rashakil Fol has a spectacular aura about 
Rep Power: 7
Solved Threads: 47
Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Salamander Man

Re: guestbook cgi script won't return reply page????

  #4  
Sep 6th, 2005
Learn Perl, and then replace the above description of a program's layout with actual code.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:09 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC