require_once("../conn.php");
require_once("access.php");
if(isset($_POST[s1]))
{
$np2 = trim($_POST[np]);
if(!empty($np2))
{
$q1 = "update yellow_types set TypeName = '$np2' where TypeID = '$_GET[id]' ";
mysql_query($q1);
if(mysql_error())
{
echo "
The property type $np2 already exists!
";
}
else
{
header("location:ptypes.php");
exit();
}
}
}
include_once("LeftStyles.php");
//get the Property Type info
$q1 = "select * from yellow_types where TypeID = '$_GET[id]' ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);
?>