lukezweb
12-17-2003, 12:25 PM
please help, i get this error.....
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/shoutbox/public_html/lukezwebforum/forum.php on line 263
############################
# GENERAL BOARD ###############
############################
} else if ($action == "general") {
?>
<center>
<form name='general' method='post'>
<table width='95%' cellspacing='2' bgcolor='black' cellpadding='1' border='0'>
<tr><td class='catbg'>
<table width='100%'>
<tr><td width='50%'>
<div align='left'>Welcome, Guest!</div>
</td>
<td width='50%'>
<div align='right'>
<?php print date("G:i:sa , j/m/Y"); ?>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class='windowbg'>
<center>
Lukezweb Forum - <a href='forum.php?action=main'>Home</a> - <a href='forum.php?action=portal'>Portal</a> - <a href=forum.php?action=help'>Help</a>
</center>
</td>
</tr>
<tr>
<td class='windowbg'>General Board</td>
</tr>
<tr><td class='windowbg'><table width='100%' border='0' cellspacing='1' bgcolor='#000000'><tr>
<td colspan='2' class='windowbg2' height='20' align='center' valign='middle'>Topics</td>
<td width='10%' class='windowbg2' align='center' valign='middle' height='20'>Started By</td>
<td width='10%' class='windowbg2' align='center' valign='middle' height='20'>Replies</td>
</tr>
<tr>
<td class='windowbg' colspan='4'>Stickies:</td>
</tr>
<tr>
<td width='10%' class='windowbg' align='center' valign='middle' height='20' onMouseOver="this.style.backgroundColor = '444444'; style.cursor='hand'" onMouseOut="this.style.backgroundColor ='';"><img src=http://geocities.com/lukezwebforum11/new.txt></td>
<td class=windowbg onMouseOver="this.style.backgroundColor = '444444'; style.cursor='hand'" onMouseOut="this.style.backgroundColor ='';"><a href=forum.php?action=post000>Welcome, First Working Thread!</a></td>
<td width='10%' class='windowbg' align='center' valign='middle' height='20' onMouseOver="this.style.backgroundColor = '444444'; style.cursor='hand'" onMouseOut="this.style.backgroundColor ='';">Luke</td>
<td width='10%' class='windowbg' align='center' valign='middle' height='20' onMouseOver="this.style.backgroundColor = '444444'; style.cursor='hand'" onMouseOut="this.style.backgroundColor ='';">0</td>
</tr>
</tr>
<tr>
<td class='windowbg' colspan='4'>Topics:</td>
</tr>
<?php
$dbh=mysql_connect ("localhost", "shoutbox_admin", "admin") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("shoutbox_forum");
$querytop = "SELECT `id` , `threadname` , `psotedby` FROM `generaltalk` WHERE 1 AND `id` > 0 ORDER BY `id` DESC LIMIT 0 , 20 ";
$topics = mysql_query($querytop) or die ("Couldn't execute query.");
while ($topics = mysql_fetch_array($topics)) {
$topics = str_replace("\n", "<br>", $topics);
$topics = str_replace("<", "<!--", $topics);
$topics = str_replace(">", "-->", $topics);
$topics = str_replace("\'", "'", $topics);
echo "<tr>
<td width='10%' class='windowbg' align='center' valign='middle' height='20'>
<img src='http://geocities.com/lukezwebforum11/new.txt'>
</td>
<td width='10%' class='windowbg' align='center' valign='middle' height='20'>
".$row['threadname']."
</td>
<td width='10%' class='windowbg' align='center' valign='middle' height='20'>
".$row['psotedby']."
</td>
<td width='10%' class='windowbg' align='center' valign='middle' height='20'>
0
</td>
</tr>";
}
?>
</table>
</td>
</tr>
</table>
</center>
</form>
<?php
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/shoutbox/public_html/lukezwebforum/forum.php on line 263
############################
# GENERAL BOARD ###############
############################
} else if ($action == "general") {
?>
<center>
<form name='general' method='post'>
<table width='95%' cellspacing='2' bgcolor='black' cellpadding='1' border='0'>
<tr><td class='catbg'>
<table width='100%'>
<tr><td width='50%'>
<div align='left'>Welcome, Guest!</div>
</td>
<td width='50%'>
<div align='right'>
<?php print date("G:i:sa , j/m/Y"); ?>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class='windowbg'>
<center>
Lukezweb Forum - <a href='forum.php?action=main'>Home</a> - <a href='forum.php?action=portal'>Portal</a> - <a href=forum.php?action=help'>Help</a>
</center>
</td>
</tr>
<tr>
<td class='windowbg'>General Board</td>
</tr>
<tr><td class='windowbg'><table width='100%' border='0' cellspacing='1' bgcolor='#000000'><tr>
<td colspan='2' class='windowbg2' height='20' align='center' valign='middle'>Topics</td>
<td width='10%' class='windowbg2' align='center' valign='middle' height='20'>Started By</td>
<td width='10%' class='windowbg2' align='center' valign='middle' height='20'>Replies</td>
</tr>
<tr>
<td class='windowbg' colspan='4'>Stickies:</td>
</tr>
<tr>
<td width='10%' class='windowbg' align='center' valign='middle' height='20' onMouseOver="this.style.backgroundColor = '444444'; style.cursor='hand'" onMouseOut="this.style.backgroundColor ='';"><img src=http://geocities.com/lukezwebforum11/new.txt></td>
<td class=windowbg onMouseOver="this.style.backgroundColor = '444444'; style.cursor='hand'" onMouseOut="this.style.backgroundColor ='';"><a href=forum.php?action=post000>Welcome, First Working Thread!</a></td>
<td width='10%' class='windowbg' align='center' valign='middle' height='20' onMouseOver="this.style.backgroundColor = '444444'; style.cursor='hand'" onMouseOut="this.style.backgroundColor ='';">Luke</td>
<td width='10%' class='windowbg' align='center' valign='middle' height='20' onMouseOver="this.style.backgroundColor = '444444'; style.cursor='hand'" onMouseOut="this.style.backgroundColor ='';">0</td>
</tr>
</tr>
<tr>
<td class='windowbg' colspan='4'>Topics:</td>
</tr>
<?php
$dbh=mysql_connect ("localhost", "shoutbox_admin", "admin") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("shoutbox_forum");
$querytop = "SELECT `id` , `threadname` , `psotedby` FROM `generaltalk` WHERE 1 AND `id` > 0 ORDER BY `id` DESC LIMIT 0 , 20 ";
$topics = mysql_query($querytop) or die ("Couldn't execute query.");
while ($topics = mysql_fetch_array($topics)) {
$topics = str_replace("\n", "<br>", $topics);
$topics = str_replace("<", "<!--", $topics);
$topics = str_replace(">", "-->", $topics);
$topics = str_replace("\'", "'", $topics);
echo "<tr>
<td width='10%' class='windowbg' align='center' valign='middle' height='20'>
<img src='http://geocities.com/lukezwebforum11/new.txt'>
</td>
<td width='10%' class='windowbg' align='center' valign='middle' height='20'>
".$row['threadname']."
</td>
<td width='10%' class='windowbg' align='center' valign='middle' height='20'>
".$row['psotedby']."
</td>
<td width='10%' class='windowbg' align='center' valign='middle' height='20'>
0
</td>
</tr>";
}
?>
</table>
</td>
</tr>
</table>
</center>
</form>
<?php