I'm trying to pass the value from a radio button to a second, and then a third page. I can pass all other values with no problem, but no value comes from the radio button.

Any ideas?

12 Years
Discussion Span
Last Post by ZWheel

There are two ways I know of doing this.

One is to use a session.

The other way would be in each subsequent form after the one with the checkbox pass the data on again using hidden inputs. For example <input type='hidden' name='rboxName' value='<? php echo($_POST); ?>'>.

In this example I am assuming you are using POST. If you are using GET it would be $_GET or if you have globals turned on and are still using them just $rboxName. If you want it to work with either POST or GET you may have to do something like:
if ($_POST) $rboxName = $_POST;
elseif ($_GET) $rboxName = $_GET;
else die("Where is rboxName!?\n");
echo ("<input type='hidden' name='rboxName' value='" . $rboxName . "'>\n");

If you already knew this, and was trying one of these methods I apologize, didn't have your code to refer to.

Hope this helps!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.