Location: PHPKode > projects > Shell Providers Customer/Accounts DB > shelldb/reports/acc_info.php
<?php include("$DOCUMENT_ROOT/includes/includes.php"); ?> 
<?php include("$DOCUMENT_ROOT/style/head.php"); ?> 
<?php include("$DOCUMENT_ROOT/includes/navbar.php"); ?>
<IMG height=5 alt="" src="/images/blank.gif" width=100><BR>
<?php include("$DOCUMENT_ROOT/style/page-body.php"); ?>
<!-- Beginning of script -->
<? 

if(!is_user()) {
echo '<a href="/login.php">Sorry please login</a>';
exit;
}

			  
			  /* Connect To Database */
			 
			  mysql_connect ($shelldb_host, $shelldb_user, $shelldb_pass);
			  mysql_select_db ($shelldb_db);
			  
			 /* Determain what to search for and where */
		
		  	$query = mysql_query("SELECT accounts.acc_login, customers.cust_name, customers.cust_email
								  FROM customers, accounts
								  WHERE accounts.acc_id ='$id'
								  AND accounts.cust_id = customers.cust_id
								 ");
		
			 
			 /* Determain Number Of Results */
			 
			 $num_results = mysql_num_rows($query); 
			 echo "Customer Details:<BR>";
			  
			 /* Print Results */
			 
			 for ($i=0; $i <$num_results; $i++)
			 {
			 	$row = mysql_fetch_array($query);
				echo "<p><strong>"." Login Name: ";
				echo htmlspecialchars( stripslashes($row["acc_login"]));
				echo "</strong><BR> Customers Name:";
				echo htmlspecialchars( stripslashes($row["cust_name"]));
				echo "<BR> Customers Email: ";
				echo htmlspecialchars( stripslashes($row["cust_email"]));
			 }
		 
?>




<!-- End of script -->
<?php include("$DOCUMENT_ROOT/style/page-body-end.php"); ?>
<?php include("$DOCUMENT_ROOT/includes/footer.php"); ?>
<?php include("$DOCUMENT_ROOT/style/footer.php"); ?>
Return current item: Shell Providers Customer/Accounts DB