<?php ob_start(); session_start();include("session.php");require_once('dbcon.php');

	$idt = $_GET['did'];
	
	$qryx = mysql_query("select * from airtime_contacts where contact_id = '$idt' ");
				$sdat = mysql_fetch_array($qryx);
				$name = $sdat['fname'];
				$phne = $sdat['contact'];	
				
				$sql = mysql_query("delete from airtime_contacts where contact_id = '$idt' and customer_id = '$session_id' ") or die (mysql_error());
				
				if($sql){
				    $qry = mysql_query("select * from airtime_logs where id = '$session_lid' ");
								$sdata=mysql_fetch_array($qry);
								$actions=$sdata['user_actions'];
								mysql_query("update airtime_logs set user_actions = '$actions Deleted $name - $phne from Contacts List.' where id='$session_lid' "); 
					?>
						<script>
							window.location="addnewcontact.php";
						</script>		
					<?php			
				}

?>