Radhe Posted January 25, 2013 Share Posted January 25, 2013 <table> <tr> <td> <table width="223" border="0" align="left" cellpadding="3" cellspacing="3"> <tr> <td width="100" align="center"><input name="Search" type="text" width="100%" placeholder="Sort By"/></td> <td width="80" align="center"><input name="Search" type="button" value="Search" /></td> </tr> </table> </td> </tr> <tr> <td><table align="left" cellpadding="3" cellspacing="3" border="1"> <tr> <td align="left"><label>Sort By Skills</label></td> <td align="center"><input name="Skills" type="checkbox" value="skills" /></td> </tr> <tr> <td align="left"><label>Sort By Experience</label></td> <td align="center"><input name="Experince" type="checkbox" value="experince" /></td> </tr> <tr> <td align="left"><label>Sort by Duration of Hire</label></td> <td align="center"><input name="Duration of Hire" type="checkbox" value="dur_hire" /></td> </tr> <tr> <td align="left"><label>Sort by Location of Hire</label></td> <td align="center"><input name="Location of Hire" type="checkbox" value="loc_hire" /></td> </tr> </table></td> </tr> </table> i've done code like this now on the basis of the selected checkbox i want to sort the data... and from sorting of data i want o search particular data by given keywords in search text box... Quote Link to comment https://forums.phpfreaks.com/topic/273618-search-data-from-database/ Share on other sites More sharing options...
Radhe Posted January 25, 2013 Author Share Posted January 25, 2013 <?php mysql_select_db("db_name") or die(mysql_error()); $data = mysql_query("SELECT * FROM table_name") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { echo "<tr>"; echo "<td>".$info['id'] . "</td>"; echo "<td>".$info['fname'] . "</td> "; echo "<td>".$info['lname'] . "</td>"; echo "</tr>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/273618-search-data-from-database/#findComment-1408126 Share on other sites More sharing options...
Radhe Posted January 25, 2013 Author Share Posted January 25, 2013 i want to select data from the table dat in data base and than sort on basis of input and than display on same page that i've sort... Quote Link to comment https://forums.phpfreaks.com/topic/273618-search-data-from-database/#findComment-1408129 Share on other sites More sharing options...
PFMaBiSmAd Posted January 25, 2013 Share Posted January 25, 2013 This post seems to be the question that you asked in your first thread. Merging the two threads together... Quote Link to comment https://forums.phpfreaks.com/topic/273618-search-data-from-database/#findComment-1408174 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.