thanks for reply,
i have moved the following bracket } but it is showing the following error.
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\sarwat_cons\Select_Emp.php on line 181
(Line 181 is the last line of below code)
COde:
<html>
<head>
<title>Employee's Data </title>
</head>
<body>
<form action = "Employee_frm.php" method = "post">
<table width = "500" border = "5" align = "center">
<tr>
<td bgcolor = "Yellow" align = "center" colspan = "5"><h1> Employee's Registration </h1></td>
</tr>
<tr>
<td>Employee Name: </td>
<td><input type = "text" name = "e_name"> </td>
</tr>
<tr>
<td>Designation: </td>
<td><input type = "text" name = "Desig_A"> </td>
</tr>
<tr>
<td>Date of Joining: </td>
<td><input type = "text" name = "doj"> </td>
</tr>
<tr>
<td>Date of Birth: </td>
<td><input type = "text" name = "dob"> </td>
</tr>
<tr>
<td>Passport #: </td>
<td><input type = "text" name = "psst"> </td>
</tr>
<tr>
<td>Visa Expiry Date: </td>
<td><input type = "text" name = "vis"> </td>
</tr>
<tr>
<td>Company Name: </td>
<td><input type = "text" name = "Comp"> </td>
</tr>
<tr>
<td>Address: </td>
<td><input type = "text" name = "addrs"> </td>
</tr>
<tr>
<td>City: </td>
<td><input type = "text" name = "cty"> </td>
</tr>
<tr>
<td>Country: </td>
<td><input type = "text" name = "cntry"> </td>
</tr>
<tr>
<td align = "center" colspan = "5"><input type = "submit" name = "e_submit" value = "submit now"> </td>
</tr>
</table>
</form>
<table width = "800" border = "5" align = "center">
<tr>
<th> Emp_no: </th>
<th> Emp_Name: </th>
<th> Designation: </th>
<th> DOJ: </th>
<th> DOB: </th>
<th> Passport #: </th>
<th> Visa Expiry: </th>
<th> Company: </th>
<th> Address: </th>
<th> City: </th>
<th> Country: </th>
<th> Delete: </th>
<th> Edit: </th>
</tr>
<?php
if (isset ($_GET["e_submit"])){
mysql_connect("localhost","root", "");
mysql_select_db("construction");
$query1 = "select * from employee";
$run = mysql_query($query1);
while ($row=mysql_fetch_array($run)){
$ecode = $row['emp_code'];
$ename1 = $row['emp_name'];
$desig_d1 = $row['desig_d'];
$doj_d1 = $row['doj'];
$dob_d1 = $row['dob'];
$psst_d1 = $row['passport_no'];
$vis_d1 = $row['visa_exp_dt'];
$comp_d1 = $row['company_d'];
$addrs_d1 = $row['address_d'];
$city_d1 = $row['city_d'];
$country_d1 = $row['country_d'];
?>
<tr>
<td> <?php echo $ecode; ?> </td>
<td> <?php echo $ename1; ?> </td>
<td> <?php echo $desig_d1; ?> </td>
<td> <?php echo $doj_d1; ?> </td>
<td> <?php echo $dob_d1; ?> </td>
<td> <?php echo $psst_d1; ?> </td>
<td> <?php echo $vis_d1; ?> </td>
<td> <?php echo $comp_d1; ?> </td>
<td> <?php echo $addrs_d1; ?> </td>
<td> <?php echo $city_d1; ?> </td>
<td> <?php echo $country_d1; ?> </td>
<td> Delete </td>
<td> Edit</td>
</tr>
<?php } ?>
}
</table>
</body>
</html>
<?php
mysql_connect("localhost","root", "");
mysql_select_db("construction");
if (isset ($POST['e_submit'])){
//$code = $post['e_code'];
$ename = $POST['e_name'];
$desig_d = $POST['Desig_A'];
$doj_d = $POST['doj'];
$dob_d = $POST['dob'];
$psst_d = $POST['psst'];
$vis_d = $POST['vis'];
$comp_d = $POST['Comp'];
$addrs_d = $POST['addrs'];
$city_d = $POST['cty'];
$country_d = $POST['cntry'];
$query = "insert into Employee
(emp_name, desig_d, doj, dob, passport_no, visa_exp_dt, company_d, address_d,city_d, country_d )
values ('$ename','$desig_d','$doj_d','$dob_d','$psst_d','$vis_d','$comp_d','$addrs_d','$city_d','$country_d')";
IF (mysql_query($query)) {
echo "<h1> Data Inserted</h1>";
}
}
?>