GlowHost Web Hosting Forums  

Go Back   GlowHost Web Hosting Forums > In The Lounge > Programming Talk
Register Forum FAQ Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-23-2008
rlhanson's Avatar
Master Glow Jedi
 
Join Date: Aug 2007
Location: Chapman, Kansas
Posts: 347
Rep Power: 35
rlhanson will become famous soon enough
Default Form Processor - multiple recipients

from my current form processor:

PHP Code:
//Format Email
$email    username@domain.com;
$subject  "Contact Form";
$headers  "From: $vis_email\r\n";
$headers .= "Content-type: text/html\r\n";
//Send Email
mail($email,$subject,$message,$headers); 
If I have a form which has a list menu of departments - can I program in the form processor to mail the form to a particular recipient and not all?
Can anyone talk me through the concept of what I need to do with programming?

Thanks in advance!
__________________
Thank you,
Lynne Hanson
RL Hanson-Online
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-23-2008
jmarcv's Avatar
immoderate moderator
 
Join Date: Jan 2005
Posts: 297
Rep Power: 67
jmarcv is just really nicejmarcv is just really nicejmarcv is just really nicejmarcv is just really nicejmarcv is just really nice
Default

You mean a select box? Just name it email.

PHP Code:
<select name=email>
<
option value="support@dude.com">Cool dudes</option>
<
option value="flimflam@stoopid.com">Morons</option>
</
select
Then when you submit -

$email=$_REQUEST['email'];
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-23-2008
rlhanson's Avatar
Master Glow Jedi
 
Join Date: Aug 2007
Location: Chapman, Kansas
Posts: 347
Rep Power: 35
rlhanson will become famous soon enough
Default

I am trying to hide the email addresses in the form page so I need to assign $email1, $email2 in the form processor....

wouldn't I need some sort of if else statement?
__________________
Thank you,
Lynne Hanson
RL Hanson-Online
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-23-2008
jmarcv's Avatar
immoderate moderator
 
Join Date: Jan 2005
Posts: 297
Rep Power: 67
jmarcv is just really nicejmarcv is just really nicejmarcv is just really nicejmarcv is just really nicejmarcv is just really nice
Default

PHP Code:
<select name=mailnum>
<
option value="1">Cool dudes</option>
<
option value="2">Morons</option>
</
select
Welcome to numbered arrays
PHP Code:
$mail[1]='support@dude.com';
$mail[2]='flimflam@stoopid.com';
 
$email=$mail[$_REQUEST['mailnum']]; 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-23-2008
rlhanson's Avatar
Master Glow Jedi
 
Join Date: Aug 2007
Location: Chapman, Kansas
Posts: 347
Rep Power: 35
rlhanson will become famous soon enough
Default

THANKS John-Marc!

Also, do you know if I use a script like the one below - will email miners still grab the email:

HTML Code:
<script language=javascript>
  <!--
  var recipient = "e-mail"
  var email = "user"
  var Host = "domainname.com"
  document.write("<a href=" + "mail" + "to:" + email + "@" + Host+ ">" + recipient + "</a>" + "!")
  //-->
</script>
__________________
Thank you,
Lynne Hanson
RL Hanson-Online
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-23-2008
jmarcv's Avatar
immoderate moderator
 
Join Date: Jan 2005
Posts: 297
Rep Power: 67
jmarcv is just really nicejmarcv is just really nicejmarcv is just really nicejmarcv is just really nicejmarcv is just really nice
Default

Most likely not, but that is such a well know script, why not disguise a little further? - just in case...

PHP Code:
  var recipient "e-mail"
  
var z1 "user";
  var 
z2 "domainname";
  var 
z3 "com";
  var 
s1 "@";
  var 
s2 ".";
  
document.write("<a href=" "mai" "lto:" +z1+s1+z2+s2+z3 ">" recipient "</a>" "!"
In fact, I tend to avoid 'email' as a name of a var anyway, because some bots reading the form can figure it out and start hitting the form with a POST of their own.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-23-2008
rlhanson's Avatar
Master Glow Jedi
 
Join Date: Aug 2007
Location: Chapman, Kansas
Posts: 347
Rep Power: 35
rlhanson will become famous soon enough
Default

okay - this makes sense to me, believe it or not!

Very helpful information as always John-Marc!
__________________
Thank you,
Lynne Hanson
RL Hanson-Online
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 05-23-2008
jmarcv's Avatar
immoderate moderator
 
Join Date: Jan 2005
Posts: 297
Rep Power: 67
jmarcv is just really nicejmarcv is just really nicejmarcv is just really nicejmarcv is just really nicejmarcv is just really nice
Default

Of course I believe it. You are a bright little girl!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-23-2008
rlhanson's Avatar
Master Glow Jedi
 
Join Date: Aug 2007
Location: Chapman, Kansas
Posts: 347
Rep Power: 35
rlhanson will become famous soon enough
Default

Wow - little girl huh? lol
__________________
Thank you,
Lynne Hanson
RL Hanson-Online
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 05-30-2008
rlhanson's Avatar
Master Glow Jedi
 
Join Date: Aug 2007
Location: Chapman, Kansas
Posts: 347
Rep Power: 35
rlhanson will become famous soon enough
Default

John-Marc -

Your advice worked perfectly, as always - thank you!
__________________
Thank you,
Lynne Hanson
RL Hanson-Online
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:12 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO
Copyright 2000-2007 GlowHost.com