Jump to content

Help with forms / GET / passing variable - Value and label??


Recommended Posts

Hi All,

 

I am very new to PHP so please be gentle with me  ;D

 

I am building a form which collects some data using method GET.

 

I have a list box which holds data like this:

 

item label-------------Value

1100-------------------2

1200-------------------3

 

I need to use both the "item label" and "value" fields in the php script i am writing. Currently only the "value" is passed.

 

Can anyone help me with ideas on how i can do this?

 

I hope this makes sense, as i mentioned i am very much a newbie to this.

 

Many Thanks

 

Dan

Hi

thanks for the quick response,

 

my data will have duplicate values, eg

item label-------------Value

1100-------------------2

1200-------------------5

1220-------------------5

3310-------------------2

 

the labels are nokia model numbers and the value represents the type of chip inside that model. I guess i can put the handset model as the value and just write some code to assign the number to each handset. Was just hopeful there would be a quicker way.

 

Another question if you dont mind.

 

When my submit button is pressed my form resets the list box values back to default. Is there a way to keep the list box values the same as was selected by the user when the submit button is pressed?

 

Thanks for your help, very much appreciated.

 

Thanks

 

Dan

 

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.