Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data lost with mysql_fetch_array

Status
Not open for further replies.

bdsadmin

IS-IT--Management
Oct 30, 2003
3
GB
here's the code i'm using:

$cjurow = mysql_fetch_array($cjulist);
while ($cjurow) {
$userlist = $cjurow["uname"];
if ($user == $userlist) {
echo &quot;<option value=\&quot;$userlist\&quot; SELECTED>&quot; . $cjurow[&quot;uname&quot;] . &quot;</option>&quot;;

}
else {
echo &quot;<option value=\&quot;$userlist\&quot;>&quot; . $cjurow[&quot;uname&quot;] . &quot;</option>&quot;;
}
$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?
 
it's handy to use ubb code tages around you're code since this looks to crappy now.
it makes it a lot easier to find a mistake
;)
 
the only line thats out of place is the while one, should be totally left
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top