<?php

	include ('dbConnect.php');

	$email = $_POST['email'] ? $_POST['email'] : $_GET['email'];
	//$email = str_replace("~", ".", $email);
	//$email = "dariusjulian@aol.com";
	$bsql = "SELECT * FROM `Users` WHERE `email` = '$email'  OR  `user_name` = '$email'";
    $sresult = mysqli_query($hookup, $bsql);
    $cnt = 0;
    $xml="<xml><data>";
	
	 while ($row = mysqli_fetch_assoc($sresult)) {
            
                $cnt++;
                $xml.="<item><id>".$row['ID']."</id>";

                $xml.= "<email>".$row['email']."</email>";
				
				$xml.="<uid>".$row['uid']."</uid>";
				
                $xml.="<first_name>".$row['first_name']."</first_name>";
 
                $xml.="<middle_name>".$row['middle_name']."</middle_name>";

                $xml.="<last_name>".$row['last_name']."</last_name>";
				
				$xml.="<cfirst_name>".$row['cfirst_name']."</cfirst_name>";

                $xml.="<cmiddle_name>".$row['cmiddle_name']."</cmiddle_name>";

                $xml.="<clast_name>".$row['clast_name']."</clast_name>";
				
                $xml.="<subscribed>".$row['subscribed']."</subscribed>";

                $xml.="<subsdate>".$row['sub_date']."</subsdate>";

                $xml.= "<user_name>".$row['user_name']."</user_name>";
				
                $xml.="<join_date>".$row['join_date']."</join_date>";
				
				$xml.="<dob>".$row['dob']."</dob>";
				
                $xml.="</item>";            

        }	
       
    	$xml.= "</data></xml>";
			
    echo $xml;
?>