$dupesql = "SELECT * FROM `transfer` WHERE 25000>=(select sum(amount) from transfer WHERE acc_no='$acc_no1') AND acc_no='$acc_no1' AND agent_id='$agent_id'";
echo "SELECT * FROM `transfer` WHERE 25000>=(select sum(amount) from transfer WHERE acc_no='$acc_no1') AND acc_no='$acc_no1' AND agent_id='$agent_id'";
$duperaw = mysql_query($dupesql);
if (mysql_num_rows($duperaw) > 0) {
$sql = mysql_query("INSERT INTO `transfer`(`t_id`, `agent_id`, `agent_name`, `date`, `name`, `phone`, `email`, `tname`, `tphone`, `temail`, `acc_no`, `bank`, `branch`, `code`, `amount`, `comment`, `status`) VALUES (NULL,'$agent_id','$agent_name','$date','$name','$phone','$email','$tname','$tphone','$temail','$accno','$bank','$branch','$code','$amt','$cmmnt','$status')");
echo '<script language="javascript">alert("Your Order has been Received \n You will be Notified via SMS/Email when the money is Transfered");window.location="../my.php"</script>';