how do I deal with option boxes:( :(
Printable View
how do I deal with option boxes:( :(
what do you mean how do you deal with them. they are a 1 or a 0 and then if they are a 1 you have the value of that checkbox.
I know that but I need a way how to check if theyr value is 1 or 0:(
can u plz give me some sample code
?
PHP Code:if ($_POST['checkbox_name']){
echo $_POST['checkbox_name']; // echos the value
}
i do that but i have error looooooooook
PHP Code:if ($_POST['V1']) {
echo "v1";
}else{
echo "v2";
}
It'd help to know what error you're getting. I don't see anything wrong with that code. Are you sure the line number matches up with that if statement?
also it show v2
Loooooooooook
clicl here please
that code own't work like that. you have to have it submitted in a form. can't jsut echo it out and expect it to run right.