Hey Guys,
Is there any way an OPTGROUP value can be POSTED just like the OPTION value?
Optgroup and PHP
Moderator: General Moderators
- iknownothing
- Forum Contributor
- Posts: 337
- Joined: Sun Dec 17, 2006 11:53 pm
- Location: Sunshine Coast, Australia
- iknownothing
- Forum Contributor
- Posts: 337
- Joined: Sun Dec 17, 2006 11:53 pm
- Location: Sunshine Coast, Australia
sounds good in theory, but the OPTGROUP is one variable, and is needed, along with whatever child of it is selected.
eg.
Fruit
Apple
Orange
Vegetable
Lettuce
Peas
variables equally Fruit and Orange need to be used to maintain filesystem integrity. Not the best example, as a fruit can't be a vegetable, but in the real version, childs of two separate parents can have the same name.
eg.
Fruit
Apple
Orange
Vegetable
Lettuce
Peas
variables equally Fruit and Orange need to be used to maintain filesystem integrity. Not the best example, as a fruit can't be a vegetable, but in the real version, childs of two separate parents can have the same name.
- iknownothing
- Forum Contributor
- Posts: 337
- Joined: Sun Dec 17, 2006 11:53 pm
- Location: Sunshine Coast, Australia
you mean this, or something similar?
Then exploding the 2... If thats what you meant than, awesome, if not, at least it will work!
Code: Select all
<option value="<?php echo $parent; ?>-<?php echo $child; ?>">Child Name</option>