I have written a HTML Form to display data from MYSQL TABLE fetched by PHP script in a drop down window.
My Problem is it displays the Value which i have defined as ALL in HTML form OPTION but it does not display the data thru PHP script. Please Help
My code is as follows:-
<form name='frmSearch' action='' method='post'>
<label>Design Category</label>
<select name="dlocation">
<option value="">All</option>
<?php
$connection=mysql_connect('localhost','root','password','dz');
$sql = "SELECT * FROM DEGSUBMIT GROUP BY dlocation ORDER BY dlocation";
$sql_result = mysql_query ($sql, $connection );
while ($row = mysql_fetch_assoc($sql_result)) {
echo "<option value='".$row["dlocation"]."'".($row["dlocation"]==$_REQUEST["dlocation"] ? " selected" : "").">".$row["dlocation"]."</option>";
}
?>
</select>
</form>