Tutorials
Using a dropdown box for the Favorite field
-
Using a dropdown box for the Favorite field
Posted on July 1, 2003
Written by
Sasha (view more by Sasha)
Comments (0)
Filed under Scripts: PHPFanBase, Tutorials
Want to use a dropdown box instead of a text field for the Favorite field? Here’s the code to edit.
Open up join.php in your HTML editor.
Find lines 292-294, looking like this:
<? if ($enablefave == 'Y'){ ?>
</tr><tr><td class="small"><?=$whatfave?>:</td>
<td><INPUT TYPE="text" NAME="fave" SIZE="40" class="form"></td>
Simply change the text field there to a dropdown, like this:
<? if ($enablefave == 'Y'){ ?>
</tr><tr><td class="small"><?=$whatfave?>:</td>
<td><select name="fave">
<option selected>Please choose...</option>
<option value="Option 1">Option 1</option>
<option value="Option 2">Option 2</option>
</select></td>
What you fill in for the value is what will get entered into the database. Just repeat the option lines as many times as necessary (making sure they remain in between the select tags!).
Comments
Comments are closed for this entry.