Code: Select all
function displayDateDropdown($Title,$Month,$Day,$Year)
{
//Create an array of months
$monthName = array (1=> "January", "February", "March", etc.
// Build selection list for the month
echo "<select name='".$Title."_dateMO'>\n";
$SelectMonthї$Month]=" selected";
for ($n=1; $n<=12; $n++) {
echo "<option value=$n".$SelectMonthї$n].">$monthNameї$n]</option>\n";
}
echo "</SELECT>\n";
etc..Code: Select all
$today = Time();
$start_dateMO = date("n", $today); //current month
$start_dateDAY = date("j", $today); //current day
$start_dateYR = date("Y", $today); //current year
$end_dateMO = date("n", $today); //same month
$end_dateDAY = date("j", $today); //same day
$end_dateYR = date("Y", $today); //same year
$broadcast_dateMO = 2; //later date
$broadcast_dateDAY = 10;
$broadcast_dateYR = 2003;I would like to call the function with the same variables in all 3 places on the form, (i.e., displayDateDropdown ($$Title,$$Month,$$Day,$$Year), instead of displayDateDropdown("start_",$start_dateMO ,$start_dateDAY,$start_dateYR), etc.), but I can't quite get my hands around the dynamic variables.
Any help would be appreciated, Ruth