|
|
#1 (permalink) |
|
Skittles
Super #1
Joined in Aug 2004
Lives in a space ship
Hosted on dedi
6,725 posts
Gave thanks: 98
Thanked 190 times
|
email form possibility?
Ok well basically I want to have a form on my site whre one would use a dropdown list and pick either sales, technical, or general.... and depending on which one you selected from that list, it will email to a different email address the rest of the info that you submit through the form...
i didnt know if this was possible with maybe javascript... or php... or maybe if i would need a cgi script to do it... if i needed to use a cgi script i would want to protect the email addresses... and have it maybe send a variable or such to the script, and the script chooses which email to send it to... if somebody could let me know what i could do it in easiest.. and/or maybe give a little example of what i could do (like maybe if theres a script i can edit for myself somewhere....). well thanks in advance for any info...
__________________
Mountain Dew Knight
People should not be afraid of their governments. Governments should be afraid of their people. |
|
|
|
|
|
#2 (permalink) | |
|
Web Hosting Super Ninj4
Super #1
Joined in Sep 2003
Lives in Fullerton, CA
1,581 posts
Gave thanks: 0
Thanked 2 times
|
Quote:
Create the form as normal, but have it pass the values to another PHP file or other section in your current one. I found a great tutorial here: http://www.christian-web-masters.com...il-form-2.html Then basically write an 'if' statement to mail to a different address if the selected option equals one you have set in the code. Something like: PHP Code:
|
|
|
|
|
|
|
#3 (permalink) |
|
surmunity freak
Comfy Contributor
Joined in Sep 2004
Lives in Baton Rouge, LA, North Amewica, USA, Earth
Hosted on D68; Serva; Pass15
143 posts
Gave thanks: 0
Thanked 0 times
|
I'm used to using php, and actually it's pretty easy with php. If you want to hide the email addresses completely, you can store them in a database, along with their named counterparts (e.g. Technical, Sales, ...), and just pass these in the form.
It would look like this PHP Code:
__________________
Server: Pass15 twwright.net NoE Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050405 Firefox/1.0 (Ubuntu package 1.0.2) I run ubuntu hoary! |
|
|
|
|
|
#4 (permalink) |
|
Skittles
Super #1
Joined in Aug 2004
Lives in a space ship
Hosted on dedi
6,725 posts
Gave thanks: 98
Thanked 190 times
|
ah i pretty much suck with php.... i could learn and probably figure it out... but if its hard i wont even bother hiding the email addresses...
__________________
Mountain Dew Knight
People should not be afraid of their governments. Governments should be afraid of their people. |
|
|
|
|
|
#5 (permalink) |
|
surmunity freak
Comfy Contributor
Joined in Sep 2004
Lives in Baton Rouge, LA, North Amewica, USA, Earth
Hosted on D68; Serva; Pass15
143 posts
Gave thanks: 0
Thanked 0 times
|
It's really not that difficult. The email addresses would be protected with either miakeru's or my response. We're just watching out for spammers that collect email addresses from web page source code.
__________________
Server: Pass15 twwright.net NoE Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050405 Firefox/1.0 (Ubuntu package 1.0.2) I run ubuntu hoary! |
|
|
|
|
|
#6 (permalink) |
|
Skittles
Super #1
Joined in Aug 2004
Lives in a space ship
Hosted on dedi
6,725 posts
Gave thanks: 98
Thanked 190 times
|
ah i cant understand php wirth **** right now... i have some books on it but its confusing as hell to me... though i program in C++.........
__________________
Mountain Dew Knight
People should not be afraid of their governments. Governments should be afraid of their people. |
|
|
|
|
|
#7 (permalink) |
|
surmunity freak
Comfy Contributor
Joined in Sep 2004
Lives in Baton Rouge, LA, North Amewica, USA, Earth
Hosted on D68; Serva; Pass15
143 posts
Gave thanks: 0
Thanked 0 times
|
I've had much experience in C (not ++), as well as Java. I picked up PHP very easily, but the one thing that kept tripping me up was the dollar sign in front of the variables. I use dreamweaver on my dev machine (actually my only machine), which is convient for the syntax highlighting.
__________________
Server: Pass15 twwright.net NoE Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050405 Firefox/1.0 (Ubuntu package 1.0.2) I run ubuntu hoary! |
|
|
|
|
|
#9 (permalink) |
|
Skittles
Super #1
Joined in Aug 2004
Lives in a space ship
Hosted on dedi
6,725 posts
Gave thanks: 98
Thanked 190 times
|
ok i think im getting it now... em whats the html input type for a dropdown again?
__________________
Mountain Dew Knight
People should not be afraid of their governments. Governments should be afraid of their people. |
|
|
|