Combining Values before form submission
I am curious to know if there is a way to combine values from two drop down options (Month and Year) as on CC form, into one variable prior to the form being submitted.
I generate my drop down options prior initiating the form like this:
// Month Selector
for ($x=1;$x<=12;$x++) {
if ($x<=9) {
$a="0".$x;
} else {
$a=$x;
}
$values_a.="<option value='$a'>$a</option>";
}
// Year Selector
for ($y=7;$y<=20;$y++) {
if ($y<=9) {
$b="200".$y;
} else {
$b="20".$y;
}
$values_b.="<option value='$b'>$b</option>";
}
echo "<form method=post
And display them on the form like this:
<tr>
<td>
Expiration date
</td>
<td>
<select name=varExpDate>$values_a</select><select name=varExpDate>$values_b</select>
</td>
</tr>
So I need to combine both of them into one variable before sending it off for processing.
Any help would be appreciated.
Thanks
__________________
Rob
|