Scenario:
The user inputs the reference number and based on his reference number, I should display the location equivalent to it.
SQL:
require_once('conn.php');
$refnum = (isset($_POST['refOff'])) ; //Get filename set in form
$query = mysql_query("SELECT * FROM pilot WHERE geo=$refnum");
// display query results
while($row = mysql_fetch_array($query))
{
$rname =$row['rname'];
$pname =$row['pname'];
$mname =$row['mname'];
}
HTML:
<tr>
<td width="283" height="32">Region:</span> </td>
<td width="407"> <input type="text"value="<?php echo $rname;?>"/></td>
</tr>
<tr>
<td width="283" height="32">Province:</span> </td>
<td width="407"> <input type="text"value="<?php echo $pname;?>"/></td>
</tr>
<tr>
<td width="283" height="32">City:</span> </td>
<td width="407"> <input type="text"value="<?php echo $mname;?>"/></td>
</tr>
The PROBLEM:
Errors are being displayed saying the rname,pname,and mname are undefined. What is wrong?Thanks again