try this:
PHP Code:
<?php
$dbi= mysql_connect('localhost','usr','pass');
mysql_select_db('dbname');
$sql_get_faq_categories1_txt = "SELECT cid,cname FROM faq_categories1 WHERE cid IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24)";
$sql_get_faq_categories1 = mysql_query($sql_get_faq_categories1_txt);
if (!$sql_get_faq_categories1)
die ("Error displaying information. Please report this information to the administrator -- ".$sql_get_faq_categories1_txt . " - " . mysql_error());
echo("<link href=\"/base.css\" rel=\"stylesheet\" type=\"text/css\" />");
if (!$cid) {
$cid=1;
}
while (list($cid,$cname)=mysql_fetch_row($sql_get_faq_categories1))
{
echo "<a href=""\"".$_SERVER['$PHP_SELF']."?cid=$cid\">$cname</a><br>";
}// done topics so now display question
if ((int)$_REQUEST['cid']>0)
{
$cid = $_GET['cid']; // <<< --- ADDDED
$sql_get_faq_questions1_txt = "SELECT fid,cid,question,answer,timestamp FROM faq_questions1 WHERE cid = $cid ";
$sql_get_faq_questions1 = mysql_query($sql_get_faq_questions1_txt);
if (!$sql_get_faq_questions1)
die ("Error displaying information. Please report this information to the administrator -- ".$sql_get_faq_questions1_txt . " - " . mysql_error());
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" width=\"100%\">";
while(list($fid,$cid,$question,$answer,$timestamp)=mysql_fetch_row($sql_get_faq_questions1))
{
echo "<tr>
<td valign=\"top\">
<table>
<tr>
<td>
Q: $question
</td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 align=center width=100%>
<tr>
<td valign=top>
<table>
<tr>
<td>
A:$answer
</td>
</tr>
</table>
</td>
</tr>";
}
echo "</table>";
} // end questions
?>
it's because it's trying to get a CID, which isn't there
there are better ways of fixing this, but i rushed that...
lol
it shud still work tho