mdvignesh Posted April 28, 2011 Share Posted April 28, 2011 I have some text boxes for searching the students in database also i have a drop down box for selecting student with balance amount to be paid tell me how to filter or search the list of stuents <select> <option value="">All </option> <option value="">Unpaid </option> <option value="">Paid </option> </select> Quote Link to comment https://forums.phpfreaks.com/topic/235001-filter-search/ Share on other sites More sharing options...
JKG Posted April 28, 2011 Share Posted April 28, 2011 can you give us some idea of your table structure? 'tell me how to' isn't very polite... Quote Link to comment https://forums.phpfreaks.com/topic/235001-filter-search/#findComment-1207742 Share on other sites More sharing options...
fugix Posted April 28, 2011 Share Posted April 28, 2011 $sql = "select * from table_name where column_name=paid"; $result = mysql_query($sql); Quote Link to comment https://forums.phpfreaks.com/topic/235001-filter-search/#findComment-1207743 Share on other sites More sharing options...
fugix Posted April 28, 2011 Share Posted April 28, 2011 this will filter what students you want information for Quote Link to comment https://forums.phpfreaks.com/topic/235001-filter-search/#findComment-1207744 Share on other sites More sharing options...
JKG Posted April 28, 2011 Share Posted April 28, 2011 ..and implemented.. <select name="status"> <option value="">All </option> <option value="">Unpaid </option> <option value="">Paid </option> </select> <?php $sql = "select appropriate_columns from table_name where column_name='".$_POST['status']."'"; $result = mysql_query($sql); ?> Quote Link to comment https://forums.phpfreaks.com/topic/235001-filter-search/#findComment-1207758 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.