Jump to content

Re: Need help this script no longer working [split]


Recommended Posts

I am actually facing the same problem here. This is strange. I got this code working a week back and not fine again. The only thing i suspected on my server was that the space was full. This is what am trying to process:

 

<?php


$tabsubmit=true;
$oktab=false;

$msg="ACTION: Transfer Funds / To Other Banks";

$checkname=(strlen($name));
$invalidname=($checkname < 5);

if(isset($afso_userid))
	{ 
		$sqlusr=mysql_query("select SUM(amount) AS Total FROM activity_table where userid='$afso_userid'") or die (mysql_error());

if(!empty($sqlusr)){
			$numusers=mysql_num_rows($sqlusr);
if($numusers==1){
$usrrow=mysql_fetch_array($sqlusr);
$amount=$usrrow["Total"];
$userid=$usrrow["userid"];
$account_no=$usrrow["account_number"];
$account_ty=$usrrow["account_type"];
$typetxn=$usrrow["typeoftxn"];
$calen=$usrrow["calendar"];
$desc=$usrrow["description"];
$place=$usrrow["placehold"];
	}
		}
			}

$amount_to_send = str_replace(',','',$amount_to_send);

$updateamount= $amount - $amount_to_send - 100;
$updateamountnew= $amount_to_send + 100;



if(isset($_POST['sub'])){

$sqlcheckcode=mysql_query("select  GPIFSA from register_account where GPIFSA='$GPIFSA'") or die (mysql_error());
if(!empty($sqlcheckcode)){
$numcode=mysql_num_rows($sqlcheckcode);
}


if(trim($bankname)==""){
$msg='Error, Please check the bank name';
}
if(trim($branch_name)==""){
$msg='Error, Please check the branch name';
}
if(trim($ToBranchAddress)==""){
$msg='Error, Please check the branch address';
}
if(trim($account)==""){
$msg='Error, Please check your account number';
}

if(!is_numeric($amount_to_send)){
$msg='The amount field must be in numeric only';
}
if(trim($amount_to_send)==""){
$msg='Error, Please specify the amount to send';
}
if(trim($F_Day)==""){
$msg='Enter the day for payment';
}
if(trim($F_Year)==""){
$msg='Enter the year for payment';
}
if(trim($F_Month)==""){
$msg='Please select a month for payment';
}

if($numcode==0){
$msg='The GPIFSA you provided cannot be found';
}

if(trim($GPIFSA)==""){
$msg='Please Provide your GPIFSA';
}
if($invalidname){
$msg='The name must be more than four digits';
}

if(trim($amount)==""){
$msg='The amount is missing';
}

if($amount - $amount_to_send <100) {
$msg='Error, The amount you specified is higher than your transfer limit';
}

else if(($bankname) && ($branch_name) && ($ToBranchAddress) && ($account) && ($amount_to_send) && ($F_Day) && ($F_Month) && ($F_Year) && ($GPIFSA)&& ($amount) && ($numcode==1) && (!$invalidname)) {

$sqlsub=mysql_query("insert into account_activity(userid,AccountSelector,name,bankname,branch_name,ToBranchAddress,swiftcode,account,Currency,amount_to_send,F_Day,F_Month,F_Year,F_AdditionalText,F_ChargeMethod,charges_rate,amount_balance,date)values('$afso_userid','$AccountSelector','$name','$bankname','$branch_name','$ToBranchAddress','$swiftcode','$account','$Currency','$amount_to_send','$F_Day','$F_Month','$F_Year','$F_AdditionalText','$F_ChargeMethod','$charges_rate','$updateamount',NOW())") or die (mysql_error());

$sqlinsert=mysql_query("insert into activity_table(amount,userid)values('-$updateamountnew','$afso_userid')") or die (mysql_error());
}

if($sqlsub){
$msg=$Reg_Succ_MSG;
$tabsubmit=false;
$oktab=true;
}
} 
?>

<?php


$tabsubmit=true;
$oktab=false;

$msg="ACTION: Transfer Funds / To Other Banks";

$checkname=(strlen($name));
$invalidname=($checkname < 5);

if(isset($afso_userid))
      { 
         $sqlusr=mysql_query("select SUM(amount) AS Total FROM activity_table where userid='$afso_userid'") or die (mysql_error());

if(!empty($sqlusr)){
            $numusers=mysql_num_rows($sqlusr);
if($numusers==1){
while(
	$usrrow=mysql_fetch_array($sqlusr)){
$amount=$usrrow["Total"];
$userid=$usrrow["userid"];
$account_no=$usrrow["account_number"];
$account_ty=$usrrow["account_type"];
$typetxn=$usrrow["typeoftxn"];
$calen=$usrrow["calendar"];
$desc=$usrrow["description"];
$place=$usrrow["placehold"];
      }
         }
            }

$amount_to_send = str_replace(',','',$amount_to_send);

$updateamount= $amount - $amount_to_send - 100;
$updateamountnew= $amount_to_send + 100;



if(isset($_POST['sub'])){

$sqlcheckcode=mysql_query("select  GPIFSA from register_account where GPIFSA='$GPIFSA'") or die (mysql_error());
if(!empty($sqlcheckcode)){
$numcode=mysql_num_rows($sqlcheckcode);
}


if(trim($bankname)==""){
$msg='Error, Please check the bank name';
}
if(trim($branch_name)==""){
$msg='Error, Please check the branch name';
}
if(trim($ToBranchAddress)==""){
$msg='Error, Please check the branch address';
}
if(trim($account)==""){
$msg='Error, Please check your account number';
}

if(!is_numeric($amount_to_send)){
$msg='The amount field must be in numeric only';
}
if(trim($amount_to_send)==""){
$msg='Error, Please specify the amount to send';
}
if(trim($F_Day)==""){
$msg='Enter the day for payment';
}
if(trim($F_Year)==""){
$msg='Enter the year for payment';
}
if(trim($F_Month)==""){
$msg='Please select a month for payment';
}

if($numcode==0){
$msg='The GPIFSA you provided cannot be found';
}

if(trim($GPIFSA)==""){
$msg='Please Provide your GPIFSA';
}
if($invalidname){
$msg='The name must be more than four digits';
}

if(trim($amount)==""){
$msg='The amount is missing';
}

if($amount - $amount_to_send <100) {
$msg='Error, The amount you specified is higher than your transfer limit';
}

else if(($bankname) && ($branch_name) && ($ToBranchAddress) && ($account) && ($amount_to_send) && ($F_Day) && ($F_Month) && ($F_Year) && ($GPIFSA)&& ($amount) && ($numcode==1) && (!$invalidname)) {

$sqlsub=mysql_query("insert into account_activity(userid,AccountSelector,name,bankname,branch_name,ToBranchAddress,swiftcode,account,Currency,amount_to_send,F_Day,F_Month,F_Year,F_AdditionalText,F_ChargeMethod,charges_rate,amount_balance,date)values('$afso_userid','$AccountSelector','$name','$bankname','$branch_name','$ToBranchAddress','$swiftcode','$account','$Currency','$amount_to_send','$F_Day','$F_Month','$F_Year','$F_AdditionalText','$F_ChargeMethod','$charges_rate','$updateamount',NOW())") or die (mysql_error());

$sqlinsert=mysql_query("insert into activity_table(amount,userid)values('-$updateamountnew','$afso_userid')") or die (mysql_error());
}

if($sqlsub){
$msg=$Reg_Succ_MSG;
$tabsubmit=false;
$oktab=true;
}
}}
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.