Results 1 to 4 of 4

Thread: [RESOLVED] Selections and mixed values

Threaded View

  1. #1

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Resolved [RESOLVED] Selections and mixed values

    Hi,

    How would I deal with mixture of radio buttons, checkbox values? At the moment I have this code:

    PHP Code:
    if(isset($_POST['genconsent'], $_POST['photo'], $_POST['mon'], $_POST['moncare'], $_POST['tue'], $_POST['tuecare'], $_POST['wed'], $_POST['wedcare'], $_POST['thur'], $_POST['thurcare'], $_POST['fri'],$_POST['fricare'],$_POST['mon2fri'], $_POST['t-shirt'],$_POST['church'],$_POST['mailout'],$_POST['wom'],$_POST['letterbox'],$_POST['newspaper'],$_POST['internet'],$_POST['school'],$_POST['other'])){

    $genconsent "Y";
    $photo "Y";
    $mon "Y";
    $moncare "Y";
    $tue "Y";
    $tuecare "Y";
    $wed "Y";
    $wedcare "Y";
    $thur "Y";
    $thurcare "Y";
    $fri "Y";
    $fricare "Y";
    $mon2fri "Y";
    $tshirt "Y";
    $church "Y";
    $mailout "Y";
    $wom "Y";
    $letterbox "Y";
    $newspaper "Y";
    $net "Y";
    $school "Y";
    $other "Y";
    }else{
        
    $genconsent "N";
    $photo "N";
    $mon "N";
    $moncare "N";
    $tue "N";
    $tuecare "N";
    $wed "N";
    $wedcare "N";
    $thur "N";
    $thurcare "N";
    $fri "N";
    $fricare "N";
    $mon2fri "N";
    $tshirt "N";
    $church "N";
    $mailout "N";
    $wom "N";
    $letterbox "N";
    $newspaper "N";
    $net "N";
    $school "N";
    $other "N";
        } 
    If set the value = "Y" else value = "N" . However, this method won't work if this is a mixtures of yes and no values. How would I retrieve the actual checkbox or radio button values so I can assign them to the above variables?

    Thanks,


    Nightwalker
    Last edited by Nightwalker83; Mar 6th, 2010 at 08:18 PM.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width