i have this problem of mine, where i don't know the script if we want to retrieve the value of option value in turn to search data. i only the script to retrieve value from input type(text).
please help me on this.
i only know this. this script is to search value by retrieving data from input type text
<?php
$connect = mysql_connect("localhost","root","") or die ("Could not connect to MYSQL database.");
mysql_select_db("sinventory") or die (my_sql_error());
$Location = $_REQUEST['txtSearch'];
$requestins = $Location . "%" ;
if($Location != "")
{
$sql = "SELECT * FROM requestins WHERE Location LIKE '".$requestins."'";
}
$result = mysql_query($sql) or die ("My SQL Error");
$num_rows = mysql_num_rows($result);
if($num_rows==0)
{
echo "<p><b></b></p>";
}
else
{
echo "<table border=1>";
while($column2=mysql_fetch_array($result))
{
extract($column2);
echo"<tr>";
echo"<td>Name</td>";
echo"<td>".$Name."</td>";
echo"</tr>";
echo"<tr>";
echo"<td>IC Number</td>";
echo"<td>".$ICNo."</td>";
echo"</tr>";
echo"<tr>";
echo"<td>Location</td>";
echo"<td>".$Location ."</td>";
echo"</tr>";
echo"<tr>";
echo"<td>Exact Location</td>";
echo"<td>".$ELocation ."</td>";
echo"</tr>";
echo"<tr>";
echo"<td>Software Name</td>";
echo"<td>".$SwName ."</td>";
echo"</tr>";
echo"<tr>";
echo"<td>Remark</td>";
echo"<td>".$Notes ."</td>";
echo"</tr>";
}
echo"</table>";
}
?>