Jump to content

getting post data from multiple select list - new topic


darkhappy

Recommended Posts

You need to make the name of the field an array:

<form method="post" action="foo.php">
  <select name="bar[]" multiple>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
  </select>
  <input type="submit" name="submit" value="Submit" />
</form>

 

Then you will get multiple values returned.

 

Ken

 

 

 

could someone show me what the code would look like to put the data from this array into var's once it's posted?

 

 

 

thanks,

bb

 

Sounds like you need a quick lesson in database normalization. Theres a good link in my signiture to a free book, it has an entire chapter dedicated to the subject.

 

If your tables are normalized properly, data can grow indefinately without the need to restructure.

Sounds like you need a quick lesson in database normalization. Theres a good link in my signiture to a free book, it has an entire chapter dedicated to the subject.

 

If your tables are normalized properly, data can grow indefinately without the need to restructure.

 

 

OOOOOOOOOHhhhhhhhhhhh...... so instead of creating a certain # of fields across 1 table ahead of time, you just create new tables as needed and link the associated fields with an ID - is that right?

Archived

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

×
×
  • 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.