Location: PHPKode > projects > A2z - Web-based address book > a2z-1.0.2/programs/list.php
<?
include ('dbkey.inc.php');
include ('master.functions.inc.php');
include ('html_head.inc.php');

print "<a href=\"edit.php?ecf_action=add\" target=\"main_frame\">
	 <IMG SRC = \"../images/button_newcontact.gif\"
	      ALT = \"Add a contact to the list\"
	      BORDER = \"0\" ALIGN = \"LEFT\"></a>
	<BR><BR><BR>";

/* Request the list to the DB */

$link_list = mysql_connect($dbhost, $dbuser, $dbpass)
	or die("Could not connect to the Database");
 mysql_select_db($dbname, $link_list)
	or die("Could nor select the databse");
$result_list = mysql_query($select_contacts);

while ( $a_row = mysql_fetch_array( $result_list ))
	{
	 if ( $div != $a_row[SubGroup] ) {
	      print "<p><B>$a_row[SubGroup]</B></P>";
	 }
	 # print var_dump($a_row);
	 print "<a href=\"display.php?ContactID=$a_row[ContactID]\"
		   target=\"main_frame\">
		$a_row[LastName], $a_row[FirstName]
		</a><br>\n";
	 $div = $a_row[SubGroup];
	}



include ('html_footer.inc.php');
?>
Return current item: A2z - Web-based address book