PDA

View Full Version : custom profile field


Dribbles
07-04-2003, 05:03 AM
is there any way to make a custom profile field's options in "edit profile" section a drop down menu instead of an empty text box? thnx

Kriek
07-04-2003, 10:23 PM
if ($userinfo[dropdown] == "0") {
$dropresult = "Value One";
} elseif ($userinfo[dropdown] == "1") {
$dropresult = "Value Two";
} elseif ($userinfo[dropdown] == "2") {
$dropresult = "Value Three";
}
<tr>
<td bgcolor="{ firstaltcolor }"><normalfont><b>DropDown:</b></normalfont></td>
<td bgcolor="{ firstaltcolor }"><smallfont>
<select name="dropresult">
<option value="0" selected>Value One</option>
<option value="1">Value Two</option>
<option value="2">Value Three</option>
</select>
</smallfont></td>
</tr>

Dribbles
07-04-2003, 10:25 PM
thnx :) how do I impliment this?

Kriek
07-04-2003, 10:52 PM
Place PHP in admin/functions.php and member.php
Place HTML in User Option Templates ? modifyprofile
Place HTML in Registration Templates ? registeradult
Place $dropdown in Info Display Templates ? getinfo

Create a field/row named dropdown in MySQL
ALTER TABLE user ADD dropdown SMALLINT (6) not null
Place dropdown='$dropdown' via $DB_site->query() in member.php and register.php