this code will display the details of the owner if I enter the application number but it is displaying errors how can i fix the errors please help me
index.php
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("db_test", $con);
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("db_test", $con);
//$sql="select * from tbl_owner";
$result = mysql_query("select * from tbl_owner where    Application_no='$_POST[name]'");
while($rowval = mysql_fetch_array($result))
 {
$name = $_POST['name'];
$Application_no= $rowval['Application_no'];
$Full_name= $rowval['Full_name'];
$contact= $rowval['contact'];
$residence= $rowval['residence'];
$age= $rowval['age'];
$status= $rowval['civil_status'];
$spouse= $rowval['name_of_spouse'];
$goods= $rowval['kind_of_goods'];
}
mysql_close($con);
?>
<html>
<head><title></title>
</head>
<body>
<form action="fill.php" method="post">
<table style="color:purple;border-style:groove; height:150px;width:350px"            background="backimage.jpg">
<tr>
<td style=" height:25px; font-family:'Copperplate Gothic Bold'">    </td>
 </tr>
<tr>
<td style="color:red;background-color:aqua;height:25px">Enter Account no
                <input name="name"  type="text"/></td>
        </tr>
<tr>
<td style="height:25px">
<input type="submit" value="Submit"          style="color:white;background-color:brown; height:30px" /></td>
        </tr>
 </table>
</form>
<span>
<table name="tab" style="color:purple;border-style:groove; height:150px;width:350px" background="3.jpg">
    <tr>
<td style="font-family:Copperplate Gothic Bold"></td>
    </tr>
        <tr>
            <td style="height:25px">
                       <input type="submit" value="Submit" style="color:white;background-color:brown; height:30px" /></td>
        </tr>
    <tr>
        <td style="color:red;background-color:aqua;" class="auto-style3">Account no:</td>
        <td class="auto-style4">
            <input id="Text1" type="text"  value='<?php echo  $Application_no; ?>'/></td>
    </tr>
    <tr>
        <td style="color:red;background-color:aqua;" class="auto-style3">Fullname</td>
        <td class="auto-style4">
            <input id="Text2" type="text" disabled value='<?php echo  $Full_name; ?>'/></td>
    </tr>
    <tr>
         <td style="color:red;background-color:aqua;" class="auto-style3">Contact:</td>
        <td class="auto-style4">
            <input id="Text3" type="text" disabled value='<?php echo  $contact; ?>' /></td>
    </tr>
    <tr>
         <td style="color:red;background-color:aqua;" class="auto-style3">Residence:</td>
        <td class="auto-style4">
            <input id="Text4" type="text" disabled value='<?php echo  $residence; ?>' /></td>
    </tr>
    <tr>
         <td style="color:red;background-color:aqua;" class="auto-style3">Age:</td>
        <td class="auto-style4">
            <input id="Text4" type="text" disabled value='<?php echo  $age; ?>' /></td>
    </tr>
    <tr>
         <td style="color:red;background-color:aqua;" class="auto-style3">Civil Status:</td>
        <td class="auto-style4">
            <input id="Text4" type="text" disabled value='<?php echo  $status; ?>' /></td>
    </tr>
    <tr>
         <td style="color:red;background-color:aqua;" class="auto-style3">Spouse:</td>
        <td class="auto-style4">
            <input id="Text4" type="text" disabled value='<?php echo  $spouse; ?>' /></td>
    </tr>
    <tr>
         <td style="color:red;background-color:aqua;" class="auto-style3">kind of goods:</td>
        <td class="auto-style4">
            <input id="Text4" type="text" disabled value='<?php echo  $goods; ?>' /></td>
    </tr>
    <tr>
        <td></td>
    </tr>
</table>
</span>
</body>
</html>
 
     
     
    