The following code produces a dynamic dropdown box.
<select name="parent">
<?php
$q = $admindb->getParentCategories();
while($row=mysql_fetch_assoc($q)){
$title=$row['title'];
$catid=$row['id'];
?>
<option value="<?php echo $catid; ?>"><?php echo $title; ?></option>
<?php
}
?>
</select>
However, if the form is returned to the user with validation errors,
I need the box to remember the previous selection..
When using a text box, I have used the following code to remember the entry..
<input type="text" name="title" value="<?php echo $form->value("title"); ?>">
How would I add what is in that value tag to the select code?
Thanks
Change your
optionline to: