In my php page i have combo box which has problem numbers.
Eg:
Select the Problem ID to view the Problems :
Expand|Select|Wrap|Line Numbers
- <select name="proid" onChange="dispValues()">
- <option value="">Please Select</option>
- <option value="PROB001">PROB001</option>
- <option value="PROB002">PROB002</option>
- <option value="PROB003">PROB003</option>
- <option value="PROB004">PROB004</option>
- <option value="PROB005">PROB005</option>
- </select>
how do i retrieve combo box value i.e problem numbers in php scripts. i.e how to retrieve the combo box value in sql query. u pls help me.Thats y i put ? mark there.what is the query to retrieve te values from the db when i click the combo box
[php]
<?php
$sql="select * from customer where probid="?"
$result=mysql_query($sql) or die(mysql_error());
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['custname'] ."</td>";
echo "<td>" . $row['city'] . "</td>";
echo "<td>" . $row['phno']. "</td>";
echo "<td>" . $row['email']. "</td>";
echo "<td>" . $row['problem']. "</td>";
echo "<td>" . $row['probid']. "</td>";
echo "</tr>";
}
?>[/php]
Please read the Posting Guidelines before you post in this forum!
Especially the part about enclosing shown code within code or php tags!!!
moderator