
09-05-2007
|
| Administrator
Join Date: Jun 2007
Posts: 3,728
BRL$: 39,663.60 Thanks: 0
Thanked 13 Times in 10 Posts
Rep Power: 409 | | Passing checkbox status to a report page Hi I have a questionnaire that contains mainly checkboxes (and a few radio buttons). Each checkbox has a generic name (name=choice) and a unique ID. I wish to pass the ticked status of each checkbox to a report page, which will echo some text accordingly: PHP: --------- if (array_key_exists('uniqueID',$_POST)) { echo "some text"; --------- This does not work, unless I switch id and name around for the checkbox. Ie name=uniqueID and id=genericnameforall checkboxes. This would be fine if unconventional. Except that the radio buttons need to have the same name for the whole set. So, why can't my report page pick up on a unique id when it is set as id=uniqueID, but it can when it is set as name=uniqueID ?? And is there any way round this? I have also tried on the report page PHP: --------- if (isset($uniqueID)) { echo "some text" --------- and that works identically to the other code. Thanks for any wisdom Tony To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. | |
__________________ █ High Quality To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
█ Powerful To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
█ To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Invite Your Friends - Easily Invite your contacts from Social Groups or Email Accounts!!! Earn BRL $ 50 for each referred member.
| | | |