943,935 Members | Top Members by Rank

Ad:
  • Perl Discussion Thread
  • Unsolved
  • Views: 16102
  • Perl RSS
Sep 6th, 2005
0

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

Expand Post »
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:
Perl Syntax (Toggle Plain Text)
  1. <html>
  2. <head></head>
  3. <body bgcolor="#ffffff">
  4.  
  5. <h1>A Simple Guestbook</h1>
  6.  
  7. <form method="post" action="first.cgi">
  8.  
  9. <h4>Name</h4>
  10. <p><input name="name" type="text" size="50"
  11.  
  12. value="Random Person">
  13.  
  14. <h4>Email</h4>
  15. <p><input name="email" type="text" size="50"
  16.  
  17. value="someone@someplace.com.au">
  18.  
  19. <h4>Your Comments</h4>
  20. <p>
  21. <textarea name="comment" rows="3" cols="50"
  22.  
  23. wrap="virtual">
  24. Enter text here...
  25. </textarea>
  26.  
  27. <p><input type="submit" value="Submit">
  28. <input type="reset" value="Clear Form">
  29.  
  30. </form>
  31. </body></html>

the cgi script:
Perl Syntax (Toggle Plain Text)
  1. #!/usr/bin/perl
  2. # Guest book reply and storage script
  3. #
  4. # Start by defining the source and target
  5. source reply.tpl
  6. target STDOUT
  7. open all
  8. # Define default values for the variables
  9. var name Fred Nurk
  10. var comment Hello World
  11. var email fnurk@csu.edu.au
  12. # Now do the processing
  13. form
  14. cgi
  15. xmlsub
  16. # Close the files
  17. close source
  18. # The following lines write the data to a file
  19. source guestbook.tpl
  20. target data.xml
  21. open all
  22. xmlsub
  23. close all
  24. #
  25. # End of the guestbook script

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

Cheers
syd
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sydneyrustle is offline Offline
8 posts
since Apr 2005
Sep 6th, 2005
0

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

That's not a perl script; that's a bunch of tab separated values.
Team Colleague
Reputation Points: 1135
Solved Threads: 172
Super Senior Demiposter
Rashakil Fol is online now Online
2,478 posts
since Jun 2005
Sep 6th, 2005
0

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

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sydneyrustle is offline Offline
8 posts
since Apr 2005
Sep 6th, 2005
0

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

Learn Perl, and then replace the above description of a program's layout with actual code.
Team Colleague
Reputation Points: 1135
Solved Threads: 172
Super Senior Demiposter
Rashakil Fol is online now Online
2,478 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Perl Forum Timeline: Download links script
Next Thread in Perl Forum Timeline: Parallel port in perl





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC