Jump to content

Archived

This topic is now archived and is closed to further replies.

jolly_jonesy

processing numbered values from forms and assigning them descriptions in mails

Recommended Posts

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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.