Well I fixed that part so now the file looks like this:
<html>
<head>
<body>
<?php require('../common.php'); 
connectdb();
mysql_select_db(xtopsites);
$validated=1;
$sql = "select id, siteurl, sitename, from sitesats where validated = '$validated'";

$r = mysql_query($sql);
$numrows = mysql_num_rows($r);
echo (mysql_error());
$row = mysql_fetch_array($r);
echo (mysql_error());
?>
</body>
</html>

Now, when I run it I get this error: 
Warning: Supplied argument is not a valid MySQL result resource in 
c:\inetpub\wwwroot/php/X-TopSites/admin/admin.php on line 11
You have an error in your SQL syntax near 'from sitesats where validated = '1'' at 
line 1
Warning: Supplied argument is not a valid MySQL result resource in 
c:\inetpub\wwwroot/php/X-TopSites/admin/admin.php on line 13
You have an error in your SQL syntax near 'from sitesats where validated = '1'' at 
line 1 

What could be wrong now?

Reply via email to