here's the code i'm using:
$cjurow = mysql_fetch_array($cjulist);
while ($cjurow) {
$userlist = $cjurow["uname"];
if ($user == $userlist) {
echo "<option value=\"$userlist\" SELECTED>" . $cjurow["uname"] . "</option>";
}
else {
echo "<option value=\"$userlist\">" . $cjurow["uname"] . "</option>";
}
$cjurow = mysql_fetch_array($cjulist);
}
where $user stores the current user name
i have 3 seperate instances of this looping. this is the 2nd. the 1st and 3rd output to a textbox and work perfectly.
BUT, with this one, when i search for value, only the values that are stored after this are displayed. Anyone got any idea wots happening?
$cjurow = mysql_fetch_array($cjulist);
while ($cjurow) {
$userlist = $cjurow["uname"];
if ($user == $userlist) {
echo "<option value=\"$userlist\" SELECTED>" . $cjurow["uname"] . "</option>";
}
else {
echo "<option value=\"$userlist\">" . $cjurow["uname"] . "</option>";
}
$cjurow = mysql_fetch_array($cjulist);
}
where $user stores the current user name
i have 3 seperate instances of this looping. this is the 2nd. the 1st and 3rd output to a textbox and work perfectly.
BUT, with this one, when i search for value, only the values that are stored after this are displayed. Anyone got any idea wots happening?