Hi guys,
i hav 1 combo box and 1 textbox in my search engine
1.city
2.name
wen i type name in text box it shows alphabet( a to z) order.
how can i do this
i done for a letter…
let us giv solution for remaining b to z letters
my search pgm hav following code:
<?php
/*set varibles from form */
$city=$_REQUEST[‘city’];
$name=$_REQUEST[‘name’];
trim ($city);
trim ($name);
require_once(“dbcon.php”);
/query the database/
$query = "select * from tbl_search where city=‘$city’ and name
LIKE ‘a%’ " ;
$result =mysql_query($query);
/number of rows found/
$num_rows = mysql_num_rows($result);
echo ‘<p>Lawyer Information: ‘.$num_rows.’</p>’;
/loops through results/
echo “<table border=‘1’ color=‘#666600’>
<tr>
<th>Name</th>
<th>Area</th>
<th>View Details</th>
<th>Website</th>
</tr>”;
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo “<tr>”;
echo “<td>” . $row[‘name’] . “</td>”;
echo “<td>” . $row[‘area’] . “</td>”;
echo “<td>”.‘<a href="’ . $row[‘link’] . ‘">’ . $row[‘view_details’] . ‘</a>’.“</td>”;
echo “<td>”.‘<a href="’ . $row[‘website_link’] . ‘">’ . $row[‘website_link’] . ‘</a>’.“</td>”;
echo “</tr>”;
}
echo “</table>”;
/free database/
/$result->free();/
?>
pls giv the soluton for this problem