Quote:
Originally Posted by mkx
hmm cant figure it out, heres my code:
Code:
$alltags = mysql_query("SELECT * FROM tags WHERE user_id=$id");
while($row1 = mysql_fetch_array($alltags))
{
echo $row1['tag_cen']; //i want to echo fields here instead of just tag_cen
}
|
Add another echo in your while loop to see if it is actually going into it.
And add:
Code:
if($alltags === false) {
die("Query failed");
}
uk3.php.net/mysql_fetch_array
And $id is definitely numeric isn't it?
Code:
$id = preg_replace('/[^0-9]/', '', $id);
Otherwise you could be open to mysql injection