Hi, thanks for the quick reply. I actually received it soon after you posted but I wanted to fiddle around with the code first before replying.
I edited my code until it finally spit out the correct answer...though I'm still unclear on what the variable, $default, in the DateDropDown function does. I also tried to pass the variable as hidden input but couldn't get it to work.
Global variables is off..I don't think its good to turn it on right?
<?php
function DateDropDown($size,$default,$name)
{
$skip=1;
echo "<select name=$name STYLE=\"font-family: monospace;\">\n";
for ($i = 0; $i <= $size; $i++){
$theday=mktime(0,0,0,date("m") ,date("d")+$i ,date("Y"));
$option=date("D M j, Y",$theday);
$value=date("m:d:Y",$theday);
$dow=date("D",$theday);
if ($dow=="Sun") {
echo "<option disabled> </option>\n";
}
if ($value == $default) {
$selected="SELECTED";
} else {
$selected="";
}
if (($dow!="Sun" and $dow!="Sat") or !$skip) {
echo "<option value=\"$value\" $selected>$option</option>\n";
}
}
echo "</select>\n";
}
echo '<FORM action="test.php" method="POST">
<P>
<LABEL for="grp_size">Group Size: </LABEL>
<INPUT type="text" name="grp_size" size="3" maxlength="3"><BR>
<LABEL for="grp_date">Group to be formed by: </LABEL><BR>';
DateDropDown(90,"dropdate","dropdate1");
echo '<BR><LABEL for="ass_date">Assignment due by: </LABEL><BR>';
DateDropDown(90,"dropdate","dropdate2");
echo '<BR><INPUT type="submit" value="Make Group Template">
</P>
</FORM>';
?>
My test.php code is as follows, I changed $GET to $POST after you pointed it out.
<?php
$dropdate1=$_POST['dropdate1'];
$dropdate2=$_POST['dropdate2'];
echo $dropdate1;
echo $dropdate2;
?>