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

Reply

Join Date: Apr 2005
Posts: 8
Reputation: sydneyrustle is an unknown quantity at this point 
Solved Threads: 0
sydneyrustle sydneyrustle is offline Offline
Newbie Poster

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

 
0
  #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:
  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:
  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
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,039
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

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

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

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

 
0
  #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 Quick reply to this message  
Join Date: Jun 2005
Posts: 2,039
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

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

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

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC