I'm trying to return records from MySQL database based on user id in this case but I don't think it's written right.
This is what i'm using:
$result=mysql_query("select * from coder where user_id='$profile' order by title",$con);
if (mysql_num_rows($result)){
$row = mysql_fetch_array($result);
{
$author = $row[author];
$title = $row[title];
$coder_id = $row[coder_id];
$user_id = $row[user_id];
$email = $row[email];
$poem = $row[poem];
$year = $row[year];
$comments = $row[comments];
$country = $row[country];
include("links.php3");
echo "$loadfile";
}
mysql_free_result($result);
}
else{
echo "No Result";
exit;
}
Since it's based on user id it's suppose to show all links on that id number, like if you enter 'www.domain.com/page.php3?profile=1' it's going to show all records that's using user id number '1'.
Anyone know how to do this?
Thanks,
Toby