GurusGuru
09-11-2004, 03:11 AM
I am using the following form to submit an enquiry/message:
<form name="form1" action="http://www.xyz.com/cgi-bin/mailer.pl" method="POST" onsubmit="return checkFields(this);">
<p><br>
Email<input name="email" size="40"><br><br>
Name<input name="name" size="40"><br><br>
Organization<input name="organization" size="40"><br><br>
Address<input name="address" size="40"><br><br>
City <input name="city" size="40"><br><br>
Country<input name="country" size="40"><br><br>
Message <textarea rows="4" name="Message" cols="30"></textarea><br><br>
<input type="submit" name="process_form" value="Submit Form">
<input type="reset" value="Clear Form"></p>
</form>
Can anyone develop a script that can do this:
1) As soon as someone fills his email, it checks to see if that email is present in a database file http://www.xyz.com/cgi-bin/dat.log (flat text separated by ::)(name::email::organization::address::city::country::)
2) If the email is present, then rest of the fields (Name, Organization, address, city, Country) except the message get automatically filled in from the data file http://www.xyz.com/cgi-bin/dat.log.
3) If that email is not present an alert box comes up with a message - "Email not found only registered members can send mail" and 2 buttons - 1)Try Again and 2) Register. When 'Try Again' button is clicked the alert box closes and the email field become empty. When 'Register' button is clicked, he is taken to a Registration Page - register.htm
<form name="form1" action="http://www.xyz.com/cgi-bin/mailer.pl" method="POST" onsubmit="return checkFields(this);">
<p><br>
Email<input name="email" size="40"><br><br>
Name<input name="name" size="40"><br><br>
Organization<input name="organization" size="40"><br><br>
Address<input name="address" size="40"><br><br>
City <input name="city" size="40"><br><br>
Country<input name="country" size="40"><br><br>
Message <textarea rows="4" name="Message" cols="30"></textarea><br><br>
<input type="submit" name="process_form" value="Submit Form">
<input type="reset" value="Clear Form"></p>
</form>
Can anyone develop a script that can do this:
1) As soon as someone fills his email, it checks to see if that email is present in a database file http://www.xyz.com/cgi-bin/dat.log (flat text separated by ::)(name::email::organization::address::city::country::)
2) If the email is present, then rest of the fields (Name, Organization, address, city, Country) except the message get automatically filled in from the data file http://www.xyz.com/cgi-bin/dat.log.
3) If that email is not present an alert box comes up with a message - "Email not found only registered members can send mail" and 2 buttons - 1)Try Again and 2) Register. When 'Try Again' button is clicked the alert box closes and the email field become empty. When 'Register' button is clicked, he is taken to a Registration Page - register.htm