I don’t see anything in your code that will not run with PHP 5. Try to analyze the following form and PHP code specially naming the form elements (radio buttons and i have added another hidden field).
sorry…i should’ve said the radio button is not working…it is set to List Active but when i click on the List Hidden radio it goes right back to List Active.
What it is supposed to do and what it is not working in PHP 5? Which part of code is not working?
Try once:
if (isset($_POST['submit'])) {
$hidden = $_POST['hidden'];
}
if (isset($hidden)){
$viewHidden = 1;
}
else{
$viewHidden = 0;
}
‘0’ might have been taken as a valid string and if(!$hidden) this is working as expected.
Edit:
Also I saw that you are using short tag in one of the hidden field which might also be the problem if short tag is OFF in php.ini which is default. But that is not related to radio buttons though.
it’s a form with radio buttons where users can select active or hidden products to display. based on the selection they make, it passes the hidden value to the query. thanks, but that didn’t work either.