how can i detect dynamic checkbox and radiobuttons value?

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

Post Reply
lmh85
Forum Commoner
Posts: 49
Joined: Sat Oct 28, 2006 10:49 am

how can i detect dynamic checkbox and radiobuttons value?

Post by lmh85 »

$_POST['chkMember[$key]']="on"

initially i was having $chkMember[$key]="on" in my coding and it works. But it won't work for my in my web hosting server. So, i tried the above mentioned code, it doesn't work. Is there any other way to get the values of my checkbox and radio buttons? they are created upon some validation. So, i put them in an array. anyone? help! :(
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Code: Select all

$_POST['chkMember'][$key]
:?:
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Originally you were assuming that register_globals was on... Anyway, the following should give you access to the same variable:

Code: Select all

$_POST[$chkMember[$key]];
lmh85
Forum Commoner
Posts: 49
Joined: Sat Oct 28, 2006 10:49 am

Post by lmh85 »

how do i get my globals to be on?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

lmh85 wrote:how do i get my globals to be on?
Our suggestion: don't even try. They create bad habits and aren't even supported in newer versions of PHP.
Post Reply