CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
starting a sub routing AFTER a form is completed



Feb 2, 2001, 10:11 AM

Post #1 of 3 (408 views)
starting a sub routing AFTER a form is completed Can't Post

how would i start a subroutine AFTER a form is submitted?

visit my web site at


Feb 2, 2001, 11:06 AM

Post #2 of 3 (407 views)
Re: starting a sub routing AFTER a form is completed [In reply to] Can't Post

what kind of form? you could just throw an if statement in to catch a value returned by the form, then start the sub if the condition is this

if ($contents{'form'} eq 'some_thing') { 


Feb 2, 2001, 11:19 AM

Post #3 of 3 (406 views)
Re: starting a sub routing AFTER a form is completed [In reply to] Can't Post

the code
print <<beginningHTML;
<form method="POST" action="admin.cgi">
<div align="center" style="width: 620; height: 130">
<table border="0" cellpadding="0" cellspacing="0" width="80%" bgcolor="#333333">
<td width="100%">
<p align="center"><b><font size="1" face="Verdana">..::Adding Codes::..</font></b>
<div align="center">
<table border="2" cellpadding="0" cellspacing="0" width="95%" bgcolor="#060735" bordercolor="#000000">
<td width="8%" bgcolor="#060735"> </td>
<td width="8%" bgcolor="#A8A8A8"><b><font face="Verdana" size="1">Number</font></b></td>
<td width="42%" bgcolor="#A8A8A8"><b><font face="Verdana" size="1">Code Description</font></b></td>
<td width="50%" bgcolor="#A8A8A8"><b><font face="Verdana" size="1">Code</font></b></td></tr>

for ($count = 1; $count <= $numberCodes; $count++){
print <<loopHTML;
<td width='8%'><b><font face='Verdana' size='1'>$count</font></b></td>
<td width='42%'><b><font face='Verdana' size='1'><input type='text' name='description$count' size='20'></font></b></td>
<td width='50%'><b><font face='Verdana' size='1'><input type='text' name='code$count' size='20'></font></b></td>

print <<endHTML;
<td width="8%"><b><font face="Verdana" size="1">User</font></b></td>
<td width="92%" colspan="2"><b><font face="Verdana" size="1"><input type="text" name="user2" size="20"></font></b></td>
<td width="8%"><b><font face="Verdana" size="1">Pass</font></b></td>
<td width="92%" colspan="2"><b><font face="Verdana" size="1"><input type="password" name="pass2" size="20"></font></b></td>
<td width="8%"><font face="Verdana" size="1"><b><input type="submit" value="Submit"></b></font></td>
<td width="92%" colspan="2"><font face="Verdana" size="1"><b><input type="reset" value="Reset"></b></font></td>

visit my web site at


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives