i have the following script:
<?
// Figure out the new values
if (!$newsstart) {
$limit = "7";
$nstart = "0";
$nprev = "0";
$nnext = "$limit";
} else {
$newprev = ($newsstart - $limit);
$newnext = ($newsstart + $limit);
}
// Get your stuff from the db
mysql_connect('localhost','sundog','specialk');
mysql_select_db("excel1");
$query="select * from test1 limit $newsstart,$limit";
$query_result=mysql_query($query);
$news = mysql_fetch_row($query_result);
// News Code Goes here
echo $news[0];//prints something
// Navigation
echo "<a href=\"?newsstart=$nprev\">Back</a> <a href=\"?newsstart=$nnext\">Next</a>";
?>
and i get the following error:
"Warning: Supplied argument is not a valid MySQL result resource in c:\phpweb/altaincercaredeprevnext.php on line 18" and no output. what is the problem? the script is run by itself, without any html on the side.