Jump to content

processing numbered values from forms and assigning them descriptions in mails


jolly_jonesy

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.