Merge branch 'master' into uat
[readifood.git] / lib / forms.php
index c71c11f..5751f78 100644 (file)
@@ -43,6 +43,7 @@
   function option($select, $value, $text, $selected = null) {
     echo "  <option value=\"$value\"";
     if (! isset($selected)) $selected = $_POST[$select];
+    if (! isset($selected)) $selected = get_last_selected($select);
     if ($value == $selected) echo " selected";
     echo ">$text\n";
   }