Help Needed
Hi,
I need help with a form I have created for my website, I need a script for it to work, but I really don't know how to work in Perl, could someone give me a hand, the form code is below.
Thanks
<form method="POST" action="../cgi-bin/script.pl">
<input name="recipient" type="hidden" value="5">
<input name="required" type="hidden" value="realname,email,subject">
<input name="redirect" type="hidden" value="../dynamic/mailSent.htm">
<div align="left">
<table border="0" class="tah11" cellpadding="0" cellspacing="0" width="500">
<tr>
<td width="167" align="left"><font face="Arial">Your
Name*</font></td>
<td width="329"><input type="text" name="realname" size="30"></td>
</tr>
<tr>
<td width="167" align="left"><font face="Arial">Your
Phone Number</font></td>
<td width="329"><input type="text" name="Phone" size="30"></td>
</tr>
<tr>
<td width="167" align="left"><font face="Arial">Your
E-mail Address*</font></td>
<td width="329"><input type="text" name="email" size="30"></td>
</tr>
<tr>
<td width="167" align="left"><font face="Arial">
Service Package</font></td>
<td width="329"><select size="1" name="ServicePackage">
<option selected><< Choose One >></option>
<option>Corporate</option>
<option>Airport</option>
<option>Wedding</option>
<option>Events</option>
<option>Other</option>
</select></td>
</tr>
<tr>
<td width="167" align="left"><font face="Arial">
Vehicle Requested*</font></td>
<td width="329"><select size="1" name="subject">
<option selected><< Choose One >></option>
<option>Car</option>
<option>7 Seater</option>
<option>Disabled Access</option>
<option>Other</option>
</select></td>
</tr>
<tr>
<td width="167" align="left"><font face="Arial">Date
Needed</font></td>
<td width="329"><input type="text" name="DateNeeded" size="20"></td>
</tr>
<tr>
<td width="167" align="left" valign="top"><font face="Arial">
Additional Information</font></td>
<td width="329"><textarea rows="8" name="GeneralInfo" cols="35"></textarea></td>
</tr>
</table>
</div>
<p>
<input type="submit" onClick="MM_validateForm('realname','','R','email','','RisEmail');return document.MM_returnValue" value="Submit">
<input type="reset" value="Reset" name="B2">
</p>
</form>
Busy posted this at 10:24 — 13th May 2005.
He has: 6,151 posts
Joined: May 2001
the code above, when submitted goes to ../cgi-bin/script.pl to be validated and/or sent then returns to ../dynamic/mailSent.htm
the script would validate the realname,email,subject with the function MM_validateForm('realname','','R','email','','RisEmail') then send the mail or store in database (or both)
It's not a very good script, as depending on what it's used for the person can go directly to the sent page and get whatever, the function should include another variable which determines where it's sent afterwards, if used on multi pages (different return pages), even if the redirect value was just changed to a number or value.
taffy056 posted this at 13:22 — 13th May 2005.
They have: 2 posts
Joined: May 2005
Hi Busy,
Thanks for the reply! I only wish I could understand what you mean , how do I get the form to work? I understand that it should have some kind of redirect to say that the form has been sent or not, but i'm going around in circles here and I can't figure it out. Also, how do I write a script for this, and what do I put in it?
Once again thanks!
dhotchin posted this at 14:18 — 30th May 2005.
He has: 183 posts
Joined: Nov 2003
How are you wanting to view the information they have sent? for example by email or database? If its in a database i can help you with this. I can also give you a template to use and help to set it up. I create theses everday so its a 2 second job. Let me no...
(You can email me at [email protected]) I will need some information from you such a file location on your host.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.