HighDots Forums  

email selection on a form

alt.html alt.html


Discuss email selection on a form in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
scpirin
 
Posts: n/a

Default email selection on a form - 11-06-2003 , 12:08 PM






How can I create a dropdown menu that offers different email addresses and
when submit is clicked, emails the form results to the specified email
address?

I am pretty sure HTML itself won't do it. Am willing to incorporate ASP or
PHP.

thanks,
scpirin




Reply With Quote
  #2  
Old   
Adrienne
 
Posts: n/a

Default Re: email selection on a form - 11-06-2003 , 01:15 PM






Gazing into my crystal ball I observed "scpirin" <scpirin (AT) montage (DOT) com>
writing in news:bodv620275i (AT) enews1 (DOT) newsguy.com:

Quote:
How can I create a dropdown menu that offers different email addresses
and when submit is clicked, emails the form results to the specified
email address?

I am pretty sure HTML itself won't do it. Am willing to incorporate
ASP or PHP.

thanks,
scpirin




ASP - Page 1
<form method="post" action="form2.asp">
<fieldset>
<label for="email">Email Address: </label>
<!-- If you are getting the email addresses from a database, open a
recordset here -->
<select name="email" id="email">
<!-- Begin looping through your recordset -->
<option value="">Select an Email Address</option>
<option value="you (AT) example (DOT) com">you (AT) example (DOT) com</option>
<option value="me (AT) example (DOT) com">me (AT) example (DOT) com</option>
<!-- end looping -->
</select>
<p style="text-align:center"><input type="submit" value="Submit" /></p>
</fieldset>
</form>

Page 2

<% dim email

email = request.form("email")

newmail.to = email
newmail.body = "Your message here"
newmail.send

%>

Adjust page 2 to whatever mailing system you are using, CDO, Aspmail, etc.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com


Reply With Quote
  #3  
Old   
Default User
 
Posts: n/a

Default Re: email selection on a form - 11-06-2003 , 03:31 PM



scpirin wrote:

Quote:
Thanks much guys.....
Will work on both formats and see if I can get it to work........

Make sure your mail handling script doesn't take in an address from the
form and use it willy-nilly. Otherwise spammers can exploit your script
to their benefit and likely your sorrow.




Brian Rodenborn


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.