I have used this code in Lycos services and worked well, but now I have my homepages in other place and it does not work. Why?
<?php
print "<p><hr></p>";
$db = mysql_connect("localhost","name","password");
$HakuLause = "SELECT * FROM news order by ID desc";
$lauseen_tulos = mysql_query($HakuLause,$db);
$i = 0;
while ($kannanotto=mysql_fetch_row($lauseen_tulos))
{
if($i<3)
{
print "<p align=\"left\" class=\"style14\"><strong><a class=\"vari\" href=\"kannanotot.php?ID=$kannanotto[0]\">$kannanotto[1]
</a> <br>> $kannanotto[3]</strong></p>";
$i++;
}
}
print "<hr>";
?>
Now I get following warning:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/nimi/public_html/kannanottoja.php on line 14
Why? I have tried to solve this thing now for a while, but I guess I'm too tired. Problem must be esty to solve.