Ejemplo n.º 1
0
	  <title>$title</title> 
	</head>
	<body>
HEADER;

echo "<h1>&lt;enhanCSE/&gt; Local Contact Manager</h1>";
echo '<p align="right"><a href="logout.php">Logout!</a></p>';

$cm = new ContactManager();

if(isset($_POST['action'])){
	$action = $_POST['action'];
	switch($action) {
		case 'New Contact ...' :
		{
			$cm->displayForm($mysql);
			break;
		}
		case 'Edit' :
		{
			if(!isset($_POST['cid']))
				echo "<p>The contact was not selected. Please try again.</p>";
			else {
				$cid = $_POST['cid'];
				$cm->displayForm($mysql, $cid, $uid);
			}
			break;
		}
		case 'Delete' :
		{
			if(!isset($_POST['cid']))