•
•
•
•
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
![]() |
•
•
Join Date: Nov 2003
Location: Toronto, Canada
Posts: 354
Reputation:
Rep Power: 6
Solved Threads: 5
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!
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!
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Radio Button If Statement (PHP)
- Retaining radio button value during paging (ASP)
- Testing Which Radio Button is selected (ASP.NET)
- How to retrieve data from a dynamically generated radio button (ASP.NET)
- problem in passing multiple checkbox values (ASP)
- Want to use radio button or menu bar instead of combo box (Java)
- Am not able to get a radio button selection to display in output (PHP)
- Security Settings -> Java permission -> Custom (radio button) -> Java Custom Settings (Web Browsers)
Other Threads in the PHP Forum
- Previous Thread: Good PHP Tutorial
- Next Thread: probem with installing php engine?!!


Linear Mode