Hello
I know PHP is perfect for processing forms, but is it also possible to fill in forms with a PHP script? I'd like a script to display a filled form (sort of a table, but using checkboxes etc. that can be filled by the script).
Thanks a lot!
Ofcourse. Just us PHP to print the appropriate values into the html code like this echo "<input name=something value=\"$variable\">";
Thank you! Do you also know how to mark/unmark a checkbox this way (i.e. the values of a checkbox)?
just add keywrd 'checked'like in :
echo "<input type=\"checkbox\" name=\"checkbox\" value=\"checkbox\" checked>"
Yup, and you can 'check' selectbox items by adding 'selected' in the option:
<option value=bla selected>bla</option>
I use things like
value="<? echo $variable ?>"
which seems to work fine as well.
For input boxes yes, but not for checkboxes or radiobuttons