Added contact offers.
[readifood.git] / lib / forms.php
index c71c11f..b7da305 100644 (file)
     else echo $_POST[$name];
     echo "</textarea>";
     echo "<script>\n  $(function() {\n";
-    echo "    $(\"#$id\").autosize();\n";
+    echo "    autosize($(\"#$id\"));\n";
     echo "  });</script>";
   }
 
   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";
   }