...

View Full Version : How to send month and year values to a sigle radio button?



teletubby
02-25-2012, 10:41 PM
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?

mlseim
02-26-2012, 12:22 AM
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 ...";



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum