User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 427,376 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,988 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 15823 | Replies: 3
Reply
Join Date: Sep 2004
Posts: 1
Reputation: johnsherman is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
johnsherman johnsherman is offline Offline
Newbie Poster

Problem passing value from radio button to second page.

  #1  
Sep 15th, 2004
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?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2004
Posts: 215
Reputation: PoA is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 4
PoA PoA is offline Offline
Posting Whiz in Training

Re: Problem passing value from radio button to second page.

  #2  
Sep 15th, 2004
Could you post your code here?
Reply With Quote  
Join Date: Nov 2003
Location: Toronto, Canada
Posts: 354
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Rep Power: 6
Solved Threads: 5
Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: Problem passing value from radio button to second page.

  #3  
Sep 18th, 2004
Yes that would be best
Reply With Quote  
Join Date: Sep 2004
Location: Saline, MI
Posts: 9
Reputation: ZWheel is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ZWheel's Avatar
ZWheel ZWheel is offline Offline
Newbie Poster

Re: Problem passing value from radio button to second page.

  #4  
Sep 21st, 2004
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['rboxName']); ?>'>.

In this example I am assuming you are using POST. If you are using GET it would be $_GET['rboxName'] 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']) $rboxName = $_POST['rboxName'];
elseif ($_GET['rboxName']) $rboxName = $_GET['rboxName'];
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!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 3:57 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC