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?

Recommended Answers

All 3 Replies

Could you post your code here?

Yes that would be best :)

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:
<?php
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!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.