Hello.I have this piece of code
function make_calendar_pulldowns($m = NULL) {
$choice = array (1 => 'Hardware', 'Software', 'Console', 'Others');
echo '<select name="month">';
foreach ($choice as $key => $value) {
echo "<option value=\"$key\"";
if ($key == $m) { // preselectare ?!
echo ' selected="selected"';
}
echo ">$value</option>\n";
}
echo '</select>';
And i print it using
<p>Category: <?php make_calendar_pulldowns($categories['mon']); ?> </p>
which i use to generate a drop down list.I want to assign the selected values to a variable, but i can't make it work.