So after searching a whole day i came across a code that i have modified it in my way.. but its not working...I've used the code to build me a filter option for displaying my database content.see my FIRST.html page\[code\]<form action="SECOND.php" method="post" name="filter_option"><select name="filter_option"><option value="http://stackoverflow.com/questions/15675520/id">Default</option><option value="http://stackoverflow.com/questions/15675520/special_id">special_id_filter</option><option value="http://stackoverflow.com/questions/15675520/company_name">company_name_filter</option><option value="http://stackoverflow.com/questions/15675520/brand_name">brand_name_filter</option><option value="http://stackoverflow.com/questions/15675520/model_id">model_id_filter</option><option value="http://stackoverflow.com/questions/15675520/colour">colour_filter</option><option value="http://stackoverflow.com/questions/15675520/size">size_filter</option><option value="http://stackoverflow.com/questions/15675520/frame_type">frame_type_filter</option><option value="http://stackoverflow.com/questions/15675520/frame_for">frame_for_filter</option><option value="http://stackoverflow.com/questions/15675520/quantity">quantity_filter</option><option value="http://stackoverflow.com/questions/15675520/price">price_filter</option></select><input name="submit" type="submit"></form>\[/code\]and now check my SECOND.php page\[code\]<?php$filteroption = $_POST['filter_option'];mysql_connect("localhost","root","9689161540") or die(mysql_error());mysql_select_db("stock_entry") or die(mysql_error());$query = sprintf("SELECT * FROM stock_entry_spectacles ORDER BY %s",$filteroption);$result = mysql_query($query) or die(mysql_error()); while ($row = mysql_fetch_array($result)){echo "<table class='data' border='0' cellspacing='2' align='center'> <tr> <td align='center' class='special_id'><input type='text' name='id' value='".$row['special_id']."'></td> <td align='center' class='company_nametd'><input type='text' name='company_name' value='".$row['company_name']."'></td> <td align='center' class='brand_namestd'> <input type='text' name='brand_name' value='".$row['brand_name']."'></td> <td align='center' class='model_idtd'> <input type='text' name='model_id' value='".$row['model_id']."'></td> <td align='center' class='colour_selecttd'> <input type='text' name='colour_select' value='".$row['colour_select']."'></td> <td align='center' class='size_selecttd'> <input type='text' name='size_select' value='".$row['size_select']."'></td> <td align='center' class='type_selecttd'><input type='text' name='type_select' value='".$row['type_select']."'></td> <td align='center' class='for_selecttd'> <input type='text' name='for_select' value='".$row['for_select']."'></td> <td align='center' class='quantitytd'> <input type='text' name='quantity' value='".$row['quantity']."'></td> <td align='center' class='pricetd'> <input type='text' name='price' value='".$row['price']."'></td> <tr> </table>"; }?>\[/code\]IS ANYTHING WRONG NEAR \[code\]while ($row = mysql_fetch_array($result))\[/code\]Please help guys.... please