PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
kendall
Forum Regular
Posts: 852 Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:
Post
by kendall » Tue Jun 12, 2007 9:54 pm
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?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Jun 12, 2007 9:58 pm
If memory serves, that information isn't submitted.
Rovas
Forum Contributor
Posts: 272 Joined: Mon Aug 21, 2006 7:09 am
Location: Romania
Post
by Rovas » Wed Jun 13, 2007 3:43 am
I used and it worked
Code: Select all
if (empyt($_POST["label"])) {echo "You didn' t select x option";}
else {//code }
kendall
Forum Regular
Posts: 852 Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:
Post
by kendall » Wed Jun 13, 2007 8:39 am
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
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Wed Jun 13, 2007 8:50 am
as a rule of thumb "if it hasn't a name attribute it's not submitted"
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Wed Jun 13, 2007 11:42 am
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.
kendall
Forum Regular
Posts: 852 Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:
Post
by kendall » Wed Jun 13, 2007 12:20 pm
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