Jump to content

Creating a dropdown menu with 3 values each item.


Eggzorcist

Recommended Posts

I don't think there is a way to create more than one value attribute for a html form, and pass that into PHP. You can create your own attributes I believe, but I think Javascript is the only thing that can do stuff with them.

 

What you can do is create a value that is something like

 

value="hello:5:50"

 

and when you get the value in PHP, do an explode() on it (in my case, the delimiter would be ":", which will turn it into an array of each of the values. Beyond that I don't see a way for you to create different values for the same selection

Link to comment
Share on other sites

well ill be getting the info for the dropdown menu's from the database, and the database will have the values of id, name, price. I want it so if you select item_1 I will be able to put a sql_query to attach id, name and price, to the user using the program.

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.