nitation Posted November 24, 2008 Share Posted November 24, 2008 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; } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/134107-re-need-help-this-script-no-longer-working-split/ Share on other sites More sharing options...
revraz Posted November 24, 2008 Share Posted November 24, 2008 You should start your own thread. Quote Link to comment https://forums.phpfreaks.com/topic/134107-re-need-help-this-script-no-longer-working-split/#findComment-698044 Share on other sites More sharing options...
nitation Posted November 24, 2008 Author Share Posted November 24, 2008 Its a project am working on. Just wanna know whats wrong Quote Link to comment https://forums.phpfreaks.com/topic/134107-re-need-help-this-script-no-longer-working-split/#findComment-698057 Share on other sites More sharing options...
darkfreaks Posted November 24, 2008 Share Posted November 24, 2008 <?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; } }} ?> Quote Link to comment https://forums.phpfreaks.com/topic/134107-re-need-help-this-script-no-longer-working-split/#findComment-698064 Share on other sites More sharing options...
Daniel0 Posted November 24, 2008 Share Posted November 24, 2008 I've split this from this topic. Please do not hijack other people's topics with your own problems. Quote Link to comment https://forums.phpfreaks.com/topic/134107-re-need-help-this-script-no-longer-working-split/#findComment-698077 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.