Go Back   Novahq.net Forum > phphq.Net > phphq.Net Forums

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-13-2008, 03:18 AM
jamesr is offline jamesr
Registered User

Join Date: Aug 2008
Posts: 2

phMailer adding menu/list

I have configured a drop down menu/list field in phMailer so users can select the appropriate option. However when the variable returned only says 'array'

The variable i am trying to return is $role

This is the code i have:

PHP Section

$role=array("Select One","Founder","Board Member","Staff Member","Volunteer");

In Form HTML

<select name="role" size="1">
<?while(list($key,$val)=each($role)) {?><option value="<?=intval($key);?>"><?=htmlspecialchars(str ipslashes($val));?></option><?}?></select>

The code displays the drop down menu with the values listed in the array, but doesn't return the value.

What am i missing???
Reply With Quote
  #2  
Old 08-14-2008, 08:29 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

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

because you are using the same name for two variables. try chaning $role to $roles and each($role) to each($roles).

Then when you submit the form $role (not $roles) will contain the value the user selected. It will get this value from the field name <select name="role" size="1">
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
Reply


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

Advanced Search
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

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
Adding Capatcha to PhMailer Form Gazza phphq.Net Forums 0 04-07-2010 01:58 AM
Adding chars to phmailer Frizzo phphq.Net Forums 5 09-18-2008 11:15 PM
Initializing menu error. Ashmanslim Tech Support 0 02-27-2004 05:50 PM
What does your start menu look like? Ice Cannon General Chat 2 12-24-2002 07:05 PM
Help! Can't really see the Main Menu Flim Delta Force 0 11-07-2002 07:40 PM


All times are GMT -5. The time now is 09:51 AM.




Powered by vBulletin®