<?
/* This script processes the data passed from profile.php3 */

/* variable declaration */

$mysql_db = "dubhlinn";
$mysql_user = "dubhlinn";
$mysql_pass = "c3ae7rw";
$mysql_host = "";
$table=blkdir;

/* Make connection to the database */
mysql_connect($mysql_host, $mysql_user, $mysql_pass) or DIE("Unable to connect to database");
@mysql_select_db($mysql_db) or DIE("Unable to select database");

if (Last_Name != "") {
	$query = "select * from $table where Last_Name like '$Last_Name'";
}
else {
	$query = "select * from $table where First_Name like '$Fast_Name'";
}
$result = MYSQL_QUERY($query);
$number = MYSQL_NUMROWS($result);

while($row = mysql_fetch_array($result)) {
	$First_Name=$row["First_Name"];
	$Last_Name=$row["Last_Name"];
	$SCA_Name=$row["SCA_Name"];
	$Awards=$row["Awards"];
	$Street1=$row["Street1"];
	$Street2=$row["Street2"];
	$City=$row["City"];
	$State=$row["State"];
	$Zip=$row["Zip"];
	$Home=$row["Home"];
	$Work=$row["Work"];
	$Cell=$row["OtherNo"];
	$CPbutton=$row["OtherNoType"];
	$Eprime=$row["EmailPri"];
	$Esec=$row["EmailSec"];
	$Eter=$row["EmailTer"];
	$URL=$row["URL"];
	$Heraldry=$row["Heraldry"];
	$Comments=$row["Comments"];
	$ModDate=$row["TStamp"];
	$ID=$row["ID"];

	print "Name: <b>$First_Name $Last_Name</b><br>";
	print "SCA: <b>$SCA_Name</b><br>";
	print "Awards: <b>$Awards</b><br>";
	print "Address: <b>$Street1</b><br>";
	print "Address:	<b>$Street2</b><br>";
	print "City: <b>$City</b>, State: <b>$State</b>  Zip: <b>$Zip</b><br>";
	print "Home: <b>$Home</b><br>";
	print "Work: <b>$Work</b><br>";
	print "$CPbutton: <b>$Cell</b><br>";
	print "1st E-Mail: <b>$Eprime</b><br>";
	print "2nd E-Mail: <b>$Esec</b><br>";
	print "3rd E-Mail: <b>$Eter</b><br>";
	print "URL: <a href='http://$URL'><b>$URL</b></a><br>";
	print "Heraldry: <b>$Heraldry</b><br>";
	print "Comments: <b>$Comments</b><br>";
	print "Last Modified: <b>$ModDate</b><br>";
	print "ID: <b>$ID</b><br>";
}

mysql_close();
?>