<? session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}
include("../opendb.php");
if($upd)
{
$sql="update dist_master set dist='$dist',state='$state' where code='$code' and brcode='$brcode'";
 mysqli_query($db,$sql) or die(mysqli_error());
include("dist.php");
 return;
}

$result=mysqli_query($db,"select * from dist_master where code='$code'");
$row=mysqli_fetch_array($result);
?>

<style>
body,td{font-family:'arial narrow';letter-spacing:1;}
tr{background-color:c1d7bb}
.mnu{margin-left:5}
</style>
<body bgcolor='ivory'>

<CENTER>
<BR>
<form action='<?print $PHP_SELF?>' method='post'>
<input type=hidden name='code' value='<?print $code?>'>
<table cellspacing=1 cellpadding=1 bgcolor=green>
<tr><td align=center>
<table>
<tr><td colspan=2 align=center>EDIT DISTRICT MASTER</TD></TR>
<tr><td><font color=red>District Name </td>
<td><input type=text name='dist' size=40 value='<?print $row[dist]?>'></td></tr>
<tr><td>State </td><td><input type=text name='state' size=40 value='<?print $row[state]?>'></td></tr>
<TR><TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE=SUBMIT  name='upd' VALUE='  SAVE  '></TD></TR>

</table>
</td></tr>
</table>
</form>
