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:

<body bgcolor="#ffffff">

<h1>A Simple Guestbook</h1>

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

<p><input name="name" type="text" size="50" 

value="Random Person">

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


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

Enter text here...

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


the cgi script:

#   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
#  Close the files 
close	source
# The following lines write the data to a file
source	guestbook.tpl
target	data.xml
open	all
close	all
# End of the guestbook script

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


Recommended Answers

All 3 Replies

That's not a perl script; that's a bunch of tab separated values.

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??


Learn Perl, and then replace the above description of a program's layout with actual code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.