Hi,
In my php page i have combo box which has problem numbers.
Eg:
Select the Problem ID to view the Problems :
when i select the problem number in combo box, it should display customername,ci ty,email,proble m details from the db in html table format.
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_q uery($sql) or die(mysql_error ());
while($row = mysql_fetch_arr ay($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
In my php page i have combo box which has problem numbers.
Eg:
Select the Problem ID to view the Problems :
Code:
<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_q uery($sql) or die(mysql_error ());
while($row = mysql_fetch_arr ay($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
Comment