Go Back   Novahq.net Forum > phphq.Net > phphq.Net Forums
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-29-2009, 05:15 PM
mike92772 is offline mike92772
Registered User

Join Date: Jan 2009
Location: Iowa
Posts: 2

phMailer Autoselect Subject from Array

I've setup the subject array in phMailer successfully.
My question is this: How can I automatically select the subject from the array? I have a page that lists departments and each department contact is a link to phmailer. When the user clicks department "a" then they would be taken to the phmailer page and subject "a" would be selected from the array. If the user clicks department "b" then they would be taken to the phmailer page and subject "b" is selected from the array and so on.

Thanks in advance.
__________________
Mike
Reply With Quote
  #2  
Old 01-29-2009, 05:54 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

Line 559:
Replace:
PHP Code:
<option value="<?=intval($key);?>"><?=htmlspecialchars(stripslashes($val));?></option>
With:
PHP Code:
<option value="<?=intval($key);?>"<?If(isset($_GET['dept']) AND $_GET['dept']==$key){Echo(" selected=\"selected\"");}?>><?=htmlspecialchars(stripslashes($val));?></option>
To auto select the correct department call phMailer like so:

phMailer.php?dept=0
phMailer.php?dept=1
phMailer.php?dept=2

If your subject list looks like this:
$subjects=array("Department 1","Department 2","Department 3");

0 represents Department 1
1 represents Department 2
2 represents Department 3

and so on.
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #3  
Old 01-30-2009, 01:53 PM
mike92772 is offline mike92772
Registered User

Join Date: Jan 2009
Location: Iowa
Posts: 2

Cool

Scott:
You are the man. This worked great! Thanks for the quick response.
__________________
Mike
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help for seting the link name with some string prefix to phmailer subject field..please help ..its sandeep phphq.Net Forums 0 06-02-2010 12:07 PM
phMailer - add Subject EntryField rosdi phphq.Net Forums 0 04-30-2009 11:08 AM
phmailer subject validation glennpaddock phphq.Net Forums 6 02-15-2008 02:41 PM
phMailer - Would like to prepend e-mail subject line sgharris phphq.Net Forums 1 11-13-2007 05:11 PM
HP Disk Array vs Bullet :) Steve Hardware and Software 0 04-22-2006 04:39 AM


All times are GMT -5. The time now is 01:16 PM.




Powered by vBulletin®