Location: PHPKode > projects > Pet Grooming Management System > pet/changeCompany3.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>PGMS Modify Company Page 3</title>
<?php
$cid = $_POST['cid'];
$cname = $_POST['cname'];
$address = $_POST['address'];
$city = $_POST['city'];
$st = $_POST['st'];
$zip = $_POST['zip'];
$phone = $_POST['phone'];
$fax = $_POST['fax'];
$tax = $_POST['tax'];
$tax = $tax/100;

?>
<link rel="stylesheet" type="text/css"
href="background.css" />
<META HTTP-EQUIV="REFRESH" CONTENT="2;URL=blank.php">
</head>
<body>
<?php
require ('header.inc');
require ('info.inc');
$link = mysql_connect('localhost',$r,$p) or die("Could not connect to Host.");
mysql_select_db($d) or die("Could not select database.");
$query = "UPDATE companies SET name = '$cname', address = '$address', city='$city',st='$st',zip='$zip',phone='$phone',fax='$fax',tax=$tax
          where cid = '$cid'";
$result = mysql_query($query);
	 if (mysql_affected_rows()==1){
	     echo '<P>The Company has been updated. You will be directed to the manage users page in 10 seconds';
			 }else{
			 echo '<P>Something went wrong with your update company attempt.</P>';
			 } 
require('footer.inc');
?>
</body>
</html>
Return current item: Pet Grooming Management System