I am getting this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/path/lst1.php on line 45
From this code:
<?
$sql = "SELECT * FROM catagories WHERE Parent = 'NULL'";
$q = mysql_query($sql);
echo "<SELECT name=\"catagories\" size=\"20\" multiple>\n";
// $catagory is an array, and each key in the array is the name of a column.
// stored under each key is the value for that column in the database.
while ($catagory = mysql_fetch_array($q)) {
echo "<option name=\"" . $catagory['ID'] . "\">" . $catagory['Name'] . "</option>\n";
}
echo ("</select>");
?>
If anyone could help me figure this out, I'd greatly appreciate it!
Thanks! it's just one of those days