<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Crime Reporting</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="content">
<br />
<?php
include_once("../Connection.php");
$c = new ConnectionclasS();
$c->connect();
if(isset($_REQUEST["submit"]))
{
$query="Update area_master set area_name='".$_REQUEST["txtareaname"]."' where area_id=".$_REQUEST["txtareaid"];
$c->calldata($query);
echo"<script>alert('Data Updated');document.location='areadetail.php';</script>";
}
$query = "select * from area_master where area_id=".$_REQUEST["area_id"];
$c->calldata($query);
$row=mysql_fetch_array($c->res);
?>
<form name="AreUpdate" method="post" action="#"><fieldset>
<legend><b>Area Update Details</b></legend><table><br/>
<tr>
<td><b>Area Id:</b></td>
<td><input type="text" name="txtareaid" value="<?php echo $row[0];?>" /></td>
</tr>
<tr>
<td><b>Area Name:</b></td>
<td><input type="text" name="txtareaname" value="<?php echo $row[1];?>" /></td>
</tr>
<tr>
<td><input type="submit" name="submit" value="Submit"></td>
</tr>
</table>
</fieldset>
</form>
</div>
<br />
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Crime Reporting</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="content">
<br />
<?php
include_once("../Connection.php");
$c = new ConnectionclasS();
$c->connect();
if(isset($_REQUEST["submit"]))
{
$query="Update area_master set area_name='".$_REQUEST["txtareaname"]."' where area_id=".$_REQUEST["txtareaid"];
$c->calldata($query);
echo"<script>alert('Data Updated');document.location='areadetail.php';</script>";
}
$query = "select * from area_master where area_id=".$_REQUEST["area_id"];
$c->calldata($query);
$row=mysql_fetch_array($c->res);
?>
<form name="AreUpdate" method="post" action="#"><fieldset>
<legend><b>Area Update Details</b></legend><table><br/>
<tr>
<td><b>Area Id:</b></td>
<td><input type="text" name="txtareaid" value="<?php echo $row[0];?>" /></td>
</tr>
<tr>
<td><b>Area Name:</b></td>
<td><input type="text" name="txtareaname" value="<?php echo $row[1];?>" /></td>
</tr>
<tr>
<td><input type="submit" name="submit" value="Submit"></td>
</tr>
</table>
</fieldset>
</form>
</div>
<br />
</div>
</body>
</html>
0 comments:
Post a Comment