freelanceprogrammers.org Forum Index » Perl
script help please
Joined: 17 Feb 2002
Posts: 2
script help please
I need to create webpage that has 5 different pages. 1. name 2.
address 3. city, state ad zip code 4. phne number I have to use
hidden form fields to carry the info across frompage to page and on
the fifth page output the info. I am totally lost, this class is
moving to fast and I really need help. I don`t know where to begin.
I have the html pages done, but I don`t know how to create the cgi to
run all the pages. Someone please help!!!!!
Thanks
Joined: 20 Feb 2002
Posts: 3
script help please
Well, do you know about hashes (keys/values), and getting form data?
You could submit the fields to the script, then print all the data
into hidden fields, along with the new forms. Have a hidden field
all the way through that will keep track of page numbers.
some beginning page:
..HTML code..
<input type=text name=name>
<input type=hidden name=page value=1>
<input type=submit>
..more HTML code..
script:
..some code..
$page = $form{`page`};
if ($page == 1) {
print "<input type=hidden name=name value=$form{`name`}>";
print "<input type=hidden name=page value=$page+1>";
print "<input type=text name=address>";
print "<input type=submit>";
}
if ($page == 2) {
print 3 hidden tags: name, address, and page
print "<input type=text name=city><input type=text
name=state><input type=text name=zip>";
print "<input type=submit>";
}
repeat pattern for the other 2 pages
if ($page == 5) {
print "Name: $form{`name`}<br>";
repeat for the other fields
}
Don`t forget to set the form action to the same script, and to add
one to page everytime through.
This starts off with one field and a page tracker. Every time you
submit, it puts the form fields into hidden fields and based on the
tracker prints the new fields.
If you have any questions, or want to say that I can`t teach, please
post back
--- In perl2@y..., fantasygirl73 <no_reply@y...> wrote:
> I need to create webpage that has 5 different pages. 1. name 2.
> address 3. city, state ad zip code 4. phne number I have to use
> hidden form fields to carry the info across frompage to page and on
> the fifth page output the info. I am totally lost, this class is
> moving to fast and I really need help. I don`t know where to begin.
> I have the html pages done, but I don`t know how to create the cgi
to
> run all the pages. Someone please help!!!!!
>
> Thanks
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







