The following code is giving error:
*Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in W:\Aptana WorkSpace\Website\lib\filldropdown.php on line 22*
<?php
error_reporting(E_ALL ^ E_NOTICE);
$db_host = 'localhost:3306';
$db_username = 'superuser';
$db_password = 'admin';
$db_name = 'exampledb';
//connect to the database server
$connection = mysql_connect($db_host, $db_username, $db_password) or die(mysql_error());
//select database
$db = mysql_select_db($db_name, $connection);
$dropdownControlName = $_GET['DropDownControlName'];
$divName = $_GET['DivName'];
$sqlQuery = $_GET['SqlQuery'];
$result = mysql_query($sqlQuery);
?>
<select name=" <?php $dropdownControlName ?> ">
<option>Select Category</option>
<?php while($row=mysql_fetch_array($result))
{ ?>
<option value="<?= $row[0] ?>"><?= $row[1] ?></option>
<?php } ?>
</select>