2010-04-29, 05:27 PM
ok, I have some drop down select boxes, but I want the one initially selected to be the one the users chose last. For example if the choose "username" and press submit its put "1" in the setting1 column of the user table
BUT
I want to be able to make the number in the db the initially selected one, like this:
BUT php cant be used in templates D:
BUT
I want to be able to make the number in the db the initially selected one, like this:
<select name="setting1" id="setting1">
<option value="1" <?php if (!(strcmp(1, "{$mybb->user[\'userbarimage\']}"))) {echo "selected=\"selected\"";} ?>>Username</option>
<option value="2" <?php if (!(strcmp(2, "{$mybb->user[\'userbarimage\']}"))) {echo "selected=\"selected\"";} ?>>Posts</option>
<option value="3" <?php if (!(strcmp(3, "{$mybb->user[\'userbarimage\']}"))) {echo "selected=\"selected\"";} ?>>Usergroup</option>
</select>
BUT php cant be used in templates D: