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

<html>
<head>
<title>PGMS Display Owner\'s Informantion</title>
<SCRIPT type="text/javascript">
<!--
function goToURL() { window.location = "http:blank.php"; }
// -->
</SCRIPT>
<?php
require_once ('datein.inc');
require_once ('dateout.inc');
require_once ('status.inc');
require_once ('datecheck.inc');
$pid = $_GET['pid'];
$id = $_GET['id'];
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.");
/*pull owner's information*/
$query = "select * from owner where id = '$id'";
$result = mysql_query($query) or die("Could not run query.");
$numrows = mysql_num_rows($result);
$row = mysql_fetch_array($result);
$lname = $row['lname'];
$fname = $row['fname'];
$email = $row['email'];
$address = $row['address'];
$address2 = $row['address2'];
$city = $row['city'];
$st = $row['st'];
$zip = $row['zip'];
$hphone = $row['hphone'];
$wphone = $row['wphone'];
$cphone = $row['cphone'];
$numPets = $row['num_pets'];
$onotes = $row['notes'];
$query = "SELECT *
          from breed
					order by id";
$result = mysql_query($query);
$num_breeds = mysql_num_rows($result);
echo'<center>';
for ($i=0;$i<$num_breeds;$i++)
    {
		$row = mysql_fetch_array($result);
		$dbreed[$i] = $row['breed'];
		}
?>
</head>
<body>
<?php
require ('header.inc');
echo'<form action="adddogonly.php" method="post">';
echo'<input type="hidden" name="id" value="'.$id.'" />';
echo'<input type="hidden" name="numPets" value="'.$numPets.'" />';
echo'<table frame = "hsides">';
echo'<legend>Owner\'s Info</legend>';
echo'<tr><td>First Name: </td><td><input type="text" name="fname" value = "'.$fname.'"/></td><td>Last Name: </td><td><input type="text" name="lname" value = "'.$lname.'"/></td>';
echo'<td>E-mail: </td><td><input type="text" name="email" value = "'.$email.'"/></td></tr>';
echo'<tr><td>Address: </td><td><input type="text" name="add1" value = "'.$address.'"/></td><td>Address 2:</td><td><input type="text" name="add2" value = "'.$address2.'"/></td></tr>';
echo'<tr><td>City: </td><td><input type="text" name="city" value = "'.$city.'"/></td><td>St.: </td><td><input type="text" name="st" value = "'.$st.'"/></td><td>Zip: </td><td><input type="text" name="zip" value = "'.$zip.'" /></td></tr>';
echo'<tr><td>Home Phone: </td><td><input type="text" name="hphone" value = "'.$hphone.'"/></td><td>Work Phone: </td><td><input type="text" name="wphone"  value = "'.$wphone.'"/></td>';
echo'<td>Cell Phone: </td><td><input type="text" name="cphone"  value = "'.$cphone.'"/></td></tr>';
echo'<tr><td>Notes: </td><td colspan = "5"><textarea rows="3" cols="70" name="onotes" value = "'.$onotes.'">'.$onotes.'</textarea>';
echo'</table>';
echo'<table frame = "hsides">';
echo'<legend>Dog\'s Info</legend>';
echo'<tr><td>Name: </td><td><input type="text" name="pet" value = "'.$pname.'" /></td>';
echo'<td>Breed: </td><td><select name="breed">';
for ($i=0; $i<$num_breeds; $i++) 
{
 echo'<option value="'.$dbreed[$i].'">'.$dbreed[$i].'</option>';  
}
echo'</select></td>';
echo'<td>Birthdate: </td><td><input type="text" name="bday" value = "'.$bday.'"/></td></tr>';
echo'<tr><td>Sex: </td><td><input type="radio" name = "sex" value = "m" checked/>Male<br><input type="radio" name="sex" value="f" />Female</td>';
echo'<td>Spayed/Neutered</td><td><input type="checkbox" name="spayed" value="y" /></td>';
echo'<td>Pregnant? </td><td><input type="checkbox" name="preg" value="y" /></td></tr>';
echo'<tr><td>Veterinarian: </td><td><input type="text" name="vet" /></td><td>Shots? </td><td><input type="checkbox" name="shots" value="y" /></td><td>Date:</td><td><input type="text" name="shotDate" value = "MM/DD/YYYY"/></td></tr>';
echo'<tr><td>Status: </td><td><select name="status">';
                          echo'<option value="a">Active</option>';
													echo'<option value="i">Inactive</option></select></td></tr>';
echo'<tr><td>Notes: </td><td colspan = "5"><textarea rows="3" cols="70" name="dnotes"></textarea>';
echo'</table>';
echo'<table border="0" cellpadding="0" cellspacing="0" summary="">';
echo'<tr><td><button type="reset">Clear</button></td><td><button type="submit">Add Dog</button></td><td><input type="button" value="Cancel"  onClick = "goToURL()"/></td></tr>';
echo'</table>';
echo'</form>';
require ('footer.inc');
?>
</body>
</html>
Return current item: Pet Grooming Management System