Then as long as you are passing in fid=whatever in the url then there's no reason that query should fail as $_GET['fid'] will be set. Sounds like you arn't passing fid= in the urlid is from the address viewforum.php?fid=WHAT EVER NUMBER
Show certain things in certain $id
Moderator: General Moderators
Oh woops spelling mistake :\ Anyway thats fixed now i just have this famous little error
Line 20 - 30:
Line 25:Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\program files\app serv\www\forum\viewforum.php on line 25
Code: Select all
while($r=mysql_fetch_array($result))Code: Select all
// Helped By markl999
$result = "SELECT * FROM df_threads WHERE forumid=".$_GET['fid']."";
echo $result; //for debugging
mysql_query($result) or die(mysql_error());
while($r=mysql_fetch_array($result))
{
$id=$r["id"];
$title=$r["title"];
$author=$r["author"];
$posted=$r["posted"];Change to// Helped By markl999
$result = "SELECT * FROM df_threads WHERE forumid=".$_GET['fid']."";
echo $result; //for debugging
mysql_query($result) or die(mysql_error());
while($r=mysql_fetch_array($result))
{
$id=$r["id"];
$title=$r["title"];
$author=$r["author"];
$posted=$r["posted"];
Code: Select all
// Helped By markl999
$query = "SELECT * FROM df_threads WHERE forumid=".$_GET['fid']."";
echo $query; //for debugging
$result = mysql_query($query) or die(mysql_error());
while($r=mysql_fetch_array($result))
{
$id=$r["id"];
$title=$r["title"];
$author=$r["author"];
$posted=$r["posted"];