Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post How to send month and year values to a sigle radio button?

    My links
    have month and year sent recursively and they work fine. I can't seem to be able to change the links in to buttons because I don't know how to send month and year to one radio button like I do a link. Any suggestions?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,500
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    In your <form ... >

    <input type="radio" name="date" value="2|2012"> Feb 2012</br />
    <input type="radio" name="date" value="3|2012"> Mar 2012</br />
    <input type="radio" name="date" value="4|2012"> Apr 2012</br />


    In your script ...

    $date=$_POST['date'];
    $item=explode("|",$date);
    $month=$item[0];
    $year=$item[1];

    echo "the month is: $month .... the year is $year ...";


  •  

    Posting Permissions

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