Page 1 of 1

PHP capture OptionGroup

Posted: Tue Jun 12, 2007 9:54 pm
by kendall
hi,

is there anyway you guys ever came across or came up with to capture the

Code: Select all

<!-- i want to get the label as well as the options selected in it as necessary when posted -->
<optgroup label="Label"> 
</optgroup>
of a form when $_POSTed?

Posted: Tue Jun 12, 2007 9:58 pm
by feyd
If memory serves, that information isn't submitted.

Posted: Wed Jun 13, 2007 3:43 am
by Rovas
I used and it worked

Code: Select all

if (empyt($_POST["label"])) {echo "You didn' t select x option";}
  else {//code }

Posted: Wed Jun 13, 2007 8:39 am
by kendall
Rovas wrote:I used and it worked

Code: Select all

if (empyt($_POST["label"])) {echo "You didn' t select x option";}
  else {//code }
Really? wow...wait a minute...there are <label> tags and then there is the <otpgroup label=""> you sure you got the right one?


ok i will check this out...thanks

Kendall

Posted: Wed Jun 13, 2007 8:50 am
by volka
as a rule of thumb "if it hasn't a name attribute it's not submitted"

Posted: Wed Jun 13, 2007 11:42 am
by RobertGonzalez
Why can't you just do a test post and var_dump($_POST)? That would tell you everything you need to know about what is posted without anyone here speculating as to what you can or cannot do.

Posted: Wed Jun 13, 2007 12:20 pm
by kendall
Everah wrote:Why can't you just do a test post and var_dump($_POST)? That would tell you everything you need to know about what is posted without anyone here speculating as to what you can or cannot do.
oooooooooh wowwww ok