i want to display house rent from the database depending on the house number.I have written the following code.This code neither gives an error nor displays the corresponding house rent from the DB
<td><label >26. House No.***(C179)</label></td> <td><input type="text" name="houseno" size="5" maxlength="5" tabindex=25 onblur="checkNa me2(this.value) " value="<?php if ($done==false && isset($_POST['submit'])) echo $_POST['houseno'];?>"></td> </tr> <tr> <td>27. House Rent</td> <td><input type="text" name="house_ren t" size="4" tabindex=26 maxlength="4" onBlur="checkNu mber2(this.valu e)" ></td> <?php
if(isset($_POST['houseno']))
{
$houseno =$_POST['houseno'];
$sql2 = mysql_query("se lect * from house_rent where HOUSE_TYPE='$ho useno' ") or die(mysql_error ());
$result = mysql_query($sq l2);
while ($row = mysql_fetch_arr ay($result)) {
echo "<option value='" . $row['RENT'] ."'>" . $row['RENT'] ."</option>";
}
echo "</select>";
}
?> </tr> <tr>
<td><label >26. House No.***(C179)</label></td> <td><input type="text" name="houseno" size="5" maxlength="5" tabindex=25 onblur="checkNa me2(this.value) " value="<?php if ($done==false && isset($_POST['submit'])) echo $_POST['houseno'];?>"></td> </tr> <tr> <td>27. House Rent</td> <td><input type="text" name="house_ren t" size="4" tabindex=26 maxlength="4" onBlur="checkNu mber2(this.valu e)" ></td> <?php
if(isset($_POST['houseno']))
{
$houseno =$_POST['houseno'];
$sql2 = mysql_query("se lect * from house_rent where HOUSE_TYPE='$ho useno' ") or die(mysql_error ());
$result = mysql_query($sq l2);
while ($row = mysql_fetch_arr ay($result)) {
echo "<option value='" . $row['RENT'] ."'>" . $row['RENT'] ."</option>";
}
echo "</select>";
}
?> </tr> <tr>
Comment