Jump to content

Recommended Posts

<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...

Link to comment
https://forums.phpfreaks.com/topic/273618-search-data-from-database/
Share on other sites

<?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>";

}

?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.