The next code makes a Date Dropdown Menu on a website, what do I have to add to the code to sent a chosen date to a textfile (date.txt) on the servers harddrive ?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<?php
//echo date_dropdown();
function date_dropdown($year_limit = 0){
$html_output = ' <div id="date_select" >'."\
";
$html_output .= ' <label for="date_day">Select date/label>'."\
";
/*days*/
$html_output .= ' <select name="date_day" id="day_select">'."\
";
for ($day = 1; $day <= 31; $day++) {
$html_output .= ' <option>' . $day . '</option>'."\
";
}
$html_output .= ' </select>'."\
";
/*months*/
$html_output .= ' <select name="date_month" id="month_select" >'."\
";
$months = array("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
for ($month = 1; $month <= 12; $month++) {
$html_output .= ' <option value="' . $month . '">' . $months[$month] . '</option>'."\
";
}
$html_output .= ' </select>'."\
";
/*years*/
$html_output .= ' <select name="date_year" id="year_select">'."\
";
for ($year = 2001; $year <= 2012; $year++) {
$html_output .= ' <option>' . $year . '</option>'."\
";
}
$html_output .= ' </select>'."\
";
$html_output .= ' </div>'."\
";
return $html_output;
}
$text=date_dropdown();
echo $text;
?>
</html>