Below is a piece of code i,ve configured with, It's giving me an
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/****/public_html/****/g.php on line 265. The information stored in the database can accessed be accessed by other pages, using the same code. but its not possible to read database info in "g.php". The problem reports in g.php only.. There is no problem found when i use g.php in the http://localhost , but it araises when I upload it to my website for testing.. Please comment and help me to tacle this problem out..
The screen shot is attached along with this..
if (isset($_GET['PostID'])) {
## Check if board exists
$getpost = mysql_query("SELECT Title, Timestamp, Body, PostCat1, PostCat2, PostCat3, PostCat4, Author FROM posts WHERE
PostID='".$_GET['PostID']."' AND Draft=0");
if (mysql_num_rows($getpost) == 0) {
$pagetitle =& $language['404'];
include ('template/header.htm');
include ('template/404.htm');
include ('template/footer.htm');
echo '</div><div id="sidebar">
<h1>Other Posts..........</h1>
<ul class="sidemenu">';
showfooter();
exit();
}
## If the script didn't EXIT(), show the board for the post
$postcontents = mysql_fetch_array($getpost);
$pagetitle =& $postcontents['Title'];
$get_author = mysql_query("SELECT DispName, Bio FROM ".USERS_TBL." WHERE UserID='".$postcontents['Author']."'");
$author = mysql_fetch_array($get_author);