Jump to content


Photo

processing numbered values from forms and assigning them descriptions in mails


  • Please log in to reply
1 reply to this topic

#1 jolly_jonesy

jolly_jonesy
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 24 August 2006 - 02:43 PM

Hi

I 'm relitively new to php but am making good progress on my first project. I am currently writing some code to proccess a number of existing forms. The php script had to be self contained and I can not alter the existing forms. I am able to write all the cotent very easily using:


$msg.="\nAddress: ".$_POST['address']; for example

however the form includes a dropdown menu and unfortunatly the person who design the forms included only numbers for the values rather than copying the descriptive names..... for example

option 1 in the drop down (named howreach) is:

label = 'Browsing the internet' value = '1'

so all my php script sees is '1' so...

if I write:

$msg.="\nWhere you found us: ".$_POST['howreach'];

the mail will show .... Where you found us: 1

Shows '1' rather than 'Browsing the internet'......


So, how can I write out or assign descriptions to the values 1-10 coming from my dropdown menu????

cheers

Jolly

#2 ronverdonk

ronverdonk
  • Members
  • PipPipPip
  • Advanced Member
  • 277 posts
  • LocationNetherlands

Posted 24 August 2006 - 03:01 PM

A little confusing to me! Show me some code.

ROnald  :cool:
RTFM is an almost extinct art form, it should be subsidized.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users