This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Banking System Help Needed
#1
Banking System Help Needed
Hi.


I need some help with the following files. I've worked on them since the last time I've posted about this subject through zPanel.

netbanking.sql - NO CHANGES NEEDED:
Code:
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 19, 2013 at 02:01 PM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `netbanking`
--
-- --------------------------------------------------------
--
-- Table structure for table `accountmaster`
--
CREATE TABLE IF NOT EXISTS `accountmaster` (
  `accounttype` varchar(25) NOT NULL,
  `prefix` varchar(11) NOT NULL,
  `minbalance` double(12,2) NOT NULL,
  `interest` double(10,2) NOT NULL,
  PRIMARY KEY (`accounttype`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `accountmaster`
--
INSERT INTO `accountmaster` (`accounttype`, `prefix`, `minbalance`, `interest`) VALUES
('current', 'fd', 6000.00, 600.00),
('dfd', 'gdf', 45.00, 7546.00),
('salary account', 'SAL', 0.00, 10.00),
('saving', 'sb', 4000.00, 500.00);
-- --------------------------------------------------------
--
-- Table structure for table `accounts`
--
CREATE TABLE IF NOT EXISTS `accounts` (
  `accno` varchar(25) NOT NULL,
  `customerid` int(10) NOT NULL,
  `accstatus` varchar(25) NOT NULL,
  `primaryacc` varchar(10) NOT NULL,
  `accopendate` date NOT NULL,
  `accounttype` varchar(25) NOT NULL,
  `accountbalance` double(10,2) NOT NULL,
  `unclearbalance` double(10,2) NOT NULL,
  `accuredinterest` double(10,2) NOT NULL,
  PRIMARY KEY (`accno`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `accounts`
--
INSERT INTO `accounts` (`accno`, `customerid`, `accstatus`, `primaryacc`, `accopendate`, `accounttype`, `accountbalance`, `unclearbalance`, `accuredinterest`) VALUES
('4666', 98683, 'active', '40000', '2013-02-11', 'sv', 100000.00, 100.00, 100.00);
-- --------------------------------------------------------
--
-- Table structure for table `branch`
--
CREATE TABLE IF NOT EXISTS `branch` (
  `ifsccode` varchar(25) NOT NULL,
  `branchname` varchar(50) NOT NULL,
  `city` varchar(25) NOT NULL,
  `branchaddress` text NOT NULL,
  `state` varchar(25) NOT NULL,
  `country` varchar(25) NOT NULL,
  PRIMARY KEY (`ifsccode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `branch`
--
INSERT INTO `branch` (`ifsccode`, `branchname`, `city`, `branchaddress`, `state`, `country`) VALUES
('5249898', 'Mangalore', 'gfhdh', 'hdjjj', 'PAKISTAN', 'MAHARASTRA'),
('KARB0000404', 'karkala', 'karkala', 'NEAR BUS STAND,KARLA COMPLEX,1ST FLOOR,PB 19,KARKALA 574104,UDUPI DIST', 'KARNATAKA', 'india'),
('tyg', 'yfy', 'fy', 'yfg', 'PAKISTAN', 'MAHARASTRA');
-- --------------------------------------------------------
--
-- Table structure for table `customers`
--
CREATE TABLE IF NOT EXISTS `customers` (
  `customerid` int(10) NOT NULL AUTO_INCREMENT,
  `ifsccode` varchar(25) NOT NULL,
  `firstname` varchar(25) NOT NULL,
  `lastname` varchar(25) NOT NULL,
  `loginid` varchar(25) NOT NULL,
  `accpassword` varchar(50) NOT NULL,
  `transpasword` varchar(50) NOT NULL,
  `accstatus` varchar(25) NOT NULL,
  `city` varchar(25) NOT NULL,
  `state` varchar(25) NOT NULL,
  `country` varchar(25) NOT NULL,
  `accopendate` date NOT NULL,
  `lastlogin` datetime NOT NULL,
  PRIMARY KEY (`customerid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=98684 ;
--
-- Dumping data for table `customers`
--
INSERT INTO `customers` (`customerid`, `ifsccode`, `firstname`, `lastname`, `loginid`, `accpassword`, `transpasword`, `accstatus`, `city`, `state`, `country`, `accopendate`, `lastlogin`) VALUES
(98680, 'KARB0000404', 'sadf', 'werwe', '23432', 'fgdfg', 'werwe', 'ACTIVE', '23423', 'KARNATAKA', 'INDIA', '2013-02-02', '0000-00-00 00:00:00'),
(98682, '5249898', 'Raj', 'kiran', '123456', '987654', '123456', 'ACTIVE', 'mangaloree', 'KARNATAKA', 'INDIA', '2013-02-02', '0000-00-00 00:00:00'),
(98683, '5249898', 'john', 'mark', 'cust', 'cust', 'cust', 'ACTIVE', 'mangalore', 'KARNATAKA', 'INDIA', '2013-02-09', '2013-02-16 05:25:20');
-- --------------------------------------------------------
--
-- Table structure for table `employees`
--
CREATE TABLE IF NOT EXISTS `employees` (
  `empid` int(10) NOT NULL AUTO_INCREMENT,
  `employee_name` varchar(25) NOT NULL,
  `loginid` varchar(25) NOT NULL,
  `password` varchar(25) NOT NULL,
  `emailid` varchar(30) NOT NULL,
  `contactno` varchar(30) NOT NULL,
  `createdat` date NOT NULL,
  `last_login` datetime NOT NULL,
  PRIMARY KEY (`empid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=313800 ;
--
-- Dumping data for table `employees`
--
INSERT INTO `employees` (`empid`, `employee_name`, `loginid`, `password`, `emailid`, `contactno`, `createdat`, `last_login`) VALUES
(313786, 'soudhabanu', '445545', '125487', 'soudha_ban@52yahoo.com', '9535543313', '2012-12-15', '2012-12-03 11:27:00'),
(313787, 'mahesh', 'mahesh', 'qwert', 'mahesh@gmail.com', '98478872783', '0000-00-00', '0000-00-00 00:00:00'),
(313788, 'jyothi', '3535355', '3636', 'jyothi@yahoo.com', '95425422424', '2013-01-02', '0000-00-00 00:00:00'),
(313791, 'admin', 'admin', 'admin', 'admin', 'admin', '2013-01-12', '2013-01-12 00:00:00'),
(313798, 'raj', 'rajkiran', '123456', 'abc@gmail.com', '9874563210', '2013-02-02', '0000-00-00 00:00:00'),
(313799, 'peter king', 'emp', 'emp', 'emp@gmail.com', '987456321', '2013-02-09', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `loan`
--
CREATE TABLE IF NOT EXISTS `loan` (
  `loanid` int(10) NOT NULL AUTO_INCREMENT,
  `loantype` varchar(25) NOT NULL,
  `loanamt` varchar(25) NOT NULL,
  `period` varchar(25) NOT NULL,
  `interest` float(10,2) NOT NULL,
  `startdate` date NOT NULL,
  PRIMARY KEY (`loanid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2147483647 ;
--
-- Dumping data for table `loan`
--
INSERT INTO `loan` (`loanid`, `loantype`, `loanamt`, `period`, `interest`, `startdate`) VALUES
(2147483647, 'homeloan', '300000', 'monthly', 63.09, '2012-12-02');
-- --------------------------------------------------------
--
-- Table structure for table `loanpayment`
--
CREATE TABLE IF NOT EXISTS `loanpayment` (
  `paymentid` int(10) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `paidamt` float(10,2) NOT NULL,
  `principleamt` float(10,2) NOT NULL,
  `interestamt` float(10,2) NOT NULL,
  `balance` float(10,2) NOT NULL,
  PRIMARY KEY (`paymentid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2147483647 ;
--
-- Dumping data for table `loanpayment`
--
INSERT INTO `loanpayment` (`paymentid`, `date`, `paidamt`, `principleamt`, `interestamt`, `balance`) VALUES
(2147483647, '2012-01-03', 50000.00, 25000.00, 2500.50, 250000.00);
-- --------------------------------------------------------
--
-- Table structure for table `loantype`
--
CREATE TABLE IF NOT EXISTS `loantype` (
  `loantype` varchar(25) NOT NULL,
  `prefix` varchar(25) NOT NULL,
  `maximumamt` float(10,2) NOT NULL,
  `minimumamt` float(10,2) NOT NULL,
  `interest` float(10,2) NOT NULL,
  `status` varchar(25) NOT NULL,
  UNIQUE KEY `loantype` (`loantype`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `loantype`
--
INSERT INTO `loantype` (`loantype`, `prefix`, `maximumamt`, `minimumamt`, `interest`, `status`) VALUES
('current', 'sb', 70000.00, 50000.00, 3000.00, 'active'),
('homeloan', 'hl', 1000000.00, 50000.00, 65.09, 'active'),
('sb', 'fd', 7000.00, 5000.00, 400.00, 'active');
-- --------------------------------------------------------
--
-- Table structure for table `mail`
--
CREATE TABLE IF NOT EXISTS `mail` (
  `mailid` int(10) NOT NULL AUTO_INCREMENT,
  `subject` varchar(250) NOT NULL,
  `message` text NOT NULL,
  `mdatetime` datetime NOT NULL,
  `senderid` varchar(25) NOT NULL,
  `reciverid` varchar(25) NOT NULL,
  PRIMARY KEY (`mailid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;
--
-- Dumping data for table `mail`
--
INSERT INTO `mail` (`mailid`, `subject`, `message`, `mdatetime`, `senderid`, `reciverid`) VALUES
(10, 'sdfgfdg', 'dfgfdg', '2013-01-19 05:05:58', '0', 'admin'),
(12, 'fdgdfsgsd', 'fgdsfgdsfg', '2013-02-02 05:32:29', 'admin', '98682'),
(13, 'hello this is test pag', 'this is test page to all emp', '2013-02-02 05:33:00', 'admin', '98682'),
(14, 'good morning raj kiran', 'this is welcome page', '2013-02-02 05:36:16', 'admin', '98682');
-- --------------------------------------------------------
--
-- Table structure for table `registerdpayee`
--
CREATE TABLE IF NOT EXISTS `registerdpayee` (
  `slno` int(11) NOT NULL AUTO_INCREMENT,
  `payeename` varchar(25) NOT NULL,
  `accountnumber` varchar(25) NOT NULL,
  `accounttype` varchar(25) NOT NULL,
  `bankname` varchar(25) NOT NULL,
  `ifsccode` varchar(25) NOT NULL,
  PRIMARY KEY (`slno`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=102 ;
--
-- Dumping data for table `registerdpayee`
--
INSERT INTO `registerdpayee` (`slno`, `payeename`, `accountnumber`, `accounttype`, `bankname`, `ifsccode`) VALUES
(101, 'arpitha', '26548', 'saving', 'canarabank', 'KARB0000404');
-- --------------------------------------------------------
--
-- Table structure for table `transaction`
--
CREATE TABLE IF NOT EXISTS `transaction` (
  `transactionid` int(10) NOT NULL AUTO_INCREMENT,
  `transactiondate` date NOT NULL,
  `paymentdate` datetime NOT NULL,
  `payeeid` int(25) NOT NULL,
  `receiveid` int(10) NOT NULL,
  `debitac` varchar(25) NOT NULL,
  `amount` float(10,2) NOT NULL,
  `paymentstat` varchar(25) NOT NULL,
  PRIMARY KEY (`transactionid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2147483647 ;
--
-- Dumping data for table `transaction`
--
INSERT INTO `transaction` (`transactionid`, `transactiondate`, `paymentdate`, `payeeid`, `receiveid`, `debitac`, `amount`, `paymentstat`) VALUES
(2147483647, '2012-12-13', '2012-12-03 04:21:10', 111232154, 0, '150000', 100000.00, 'active');
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

dbconnection.php - NO CHANGES NEEDED:
Code:
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
    die('Could not connect: ' . mysql_error());
}
mysql_select_db("solarcash", $con);
?>

accounttransfer.php
Ok. So, for this file, whenever someone chooses Transfer From, it is supposed to show the current balance in the Current Balance field so the customer will know if they have enough to transfer.
Code:
<?php
session_start();
include("header.php");
require("dbconnection.php");
include("functions/inactive_session_logout.php");
$to = mysql_query("SELECT accno FROM accounts");
$from = mysql_query("SELECT accno FROM accounts");
$currbal = mysql_query("SELECT accountbalance FROM accounts WHERE accno AND customerid='$_SESSION[customerid]'");
while($currbal = mysql_fetch_array($currbal))
{
    $currbal = $_POST['accountbalance'];
}
//$result = mysql_query("SELECT * FROM accounts WHERE customers='$_SESSION[customerid]'");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Account Transfer</title>
<script type="text/javascript">
function onindexchange($currbal)
{
    if(Form1.transferfrom.options[Form1.transferfrom.selectedIndex].text == "transferfrom[0]")
    {
        db.accounts(function(accountbalance)
        {
            accountbalance.executeSql("SELECT accountbalance FROM accounts WHERE accno;",
                          [parseInt($currbal)], selectedRowValues, errorHandler);
        });
    };
    selectedRowValues = function(accountbalance,results)
    {
        var row = results.transferfrom.item(i);
        alert(row['accountbalance']);
    };
}
</script>
<style type="text/css">
div.c1 {text-align: right}
</style>
</head>
<body>
<div id="templatemo_main">
  <div id="templatemo_content">
    <form id="form1" name="form1" method="post" action="accounttransfer2.php" onsubmit="return validateForm()">
      <h2>Make Account Transfer</h2>
      <table width="513" border="1">
        <tr>
          <td><strong>Transfer To:</strong></td>
          <td>
            <select name="transferto" id="transferto">
            <option value="">Select</option>
            <?php
            while($transferto = mysql_fetch_array($to, MYSQL_BOTH))
            {
                echo "<option>$transferto[0]</option>";
            }
            ?>
            </select>
          </td>
        </tr>
        <tr>
          <td><strong>Transfer Amount:</strong> </td>
          <td><input type="text" name="amount" id="amount"></td>
        </tr>
        <tr>
          <td><strong>Transfer From:</strong></td>
          <td>
            <select name="transferfrom" id="transferfrom" onclick='onindexchange()'>
            <option value="">Select</option>
            <?php
            while($transferfrom = mysql_fetch_array($from, MYSQL_BOTH))
            {
                echo "<option>$transferfrom[0]</option>";
            }
            ?>
            </select>
          </td>
        </tr>
        <tr>
          <td><strong>Current Balance:</strong> </td>
          <td><input name="currbal" type="text" value="<?php echo $currbal; ?>" readonly></td>
        </tr>
        <tr>
          <td colspan="2">
            <div class="c1"><input type="submit" name="transfer1" id="transfer1" value="Transfer"></div>
          </td>
        </tr>
      </table>
    </form>
    <div class="cleaner_h50"></div>
  </div><!-- end of content -->
  <div id="templatemo_sidebar">
    <?php
    include("custsidebar.php");
    payloans();
    ?>
    <div class="cleaner_h40"></div>
  </div>
  <div class="cleaner"></div>
</div><!-- end of main -->
<div id="templatemo_main_bottom"></div><!-- end of main -->
</body>
</html>
<?php
include("footer.php");
?>

accounttransfer2.php
  • On this page, if the Transfer To and Transfer From account numbers are the same, and/or, if no amount is entered on the previous page, there are supposed to be errors telling you to go back and correct the problem after the transfer password is entered and confirmed.
  • Also, if the transfer password isn't in the database, it supposed to give an error. The only reason I don't have it is because I don't know how to program a password search in order to accomplish it.
  • Lastly, it's not deducting money from one account and inserting it into the other.
Code:
<?php
session_start();
include("header.php");
include("dbconnection.php");
include("functions/inactive_session_logout.php");

$to = $_POST['transferto'];
$from = $_POST['transferfrom'];
$amount = $_POST['amount'];

/*if(isset($_POST['transfer1']))
{
        else
        {
                $result1 = mysql_query("SELECT * FROM accounts WHERE accountsid='$to'");
                $result2 = mysql_query("SELECT * FROM accounts WHERE accountsid='$from'");
        }
}
$transferarray = mysql_query("SELECT * FROM accounts");*/





if(isset($_POST["transfer2"]))
{
        //$newbal = $_POST['currbal'] + $_POST['amount'];

        if($_POST[trpass] == $_POST[conftrpass])
        {
                if($to === $from)
                {
                        $error = "The account numbers are the same.<br>
                                  Please <button onclick=\"history.go(-1);\">Go Back</button>
                                  and choose a different account number.";
                }
                elseif($amount == "")
                {
                        $error = "No amount has been entered.<br>
                                  Please <button onclick=\"history.go(-1);\">Go Back</button>
                                  and enter an amount.";
                }
                else
                {
                        $error = "Failed to transfer";
                }
                if($to == TRUE)
                {
                        $from = mysql_query("SELECT accountbalance FROM accounts WHERE accno='.$from.'
                                                                                 AND customerid='$_GET[customerid]'");
                        while($from = mysql_fetch_array($from, MYSQL_BOTH))
                        {
                                if($amount > $from[0])
                                {
                                        $error = "Amount insufficient!";
                                        $forward = false;
                                }
                                else
                                {
                                        $sql = ("UPDATE accounts SET accountbalance = accountbalance - $amount WHERE accno = '.$from.'");
                                        $sql = ("UPDATE accounts SET accountbalance = accountbalance + $amount WHERE accno = '.$to.'");
                                        $currbal = mysql_query("SELECT accountbalance FROM accounts WHERE accno = '.$to.'");

                                        if (mysql_query($sql))
                                        {
                                                // succeeded
                                                $result1="INSERT INTO transaction(recipient,
                                                                                  payeeid,
                                                                                  depositac,
                                                                                  transactionmethod,
                                                                                  transactiontype,
                                                                                  accountbalance,
                                                                                  transactiondate)VALUES('$_POST[accno] $to',
                                                                                                         '$_POST[accno] $from',
                                                                                                         '$_POST[amount]',
                                                                                                         'Cash',
                                                                                                         'Transfer',
                                                                                                         '$_POST[currbal]',
                                                                                                         '$_POST[date]')";
                                                header("Location: accounttransfer3.php");
                                        }
                                }
                        }
                        if (!mysql_query($sql,$con))
                        {
                                die('Error: ' . mysql_error());
                        }
                }
        }
        mysql_close($dbc);






                /*mysql_query ("UPDATE `` SET `` = `accountbalance` + `.$amount.`
                                                WHERE `` = `..`");
                                                //AND customerid='$_GET[customerid]'");*/





                /*while($res = mysql_fetch_array($to, MYSQL_BOTH))
                {
                        $updateamount = $res[0]+$amount;

                        mysql_query("UPDATE accounts SET accountbalance='$updateamount'
                                                     WHERE accno='$to'
                                                     AND customerid='$_GET[customerid]'");
                }*/





        /*else
        {
                $passerr = "<b>Invalic password entered...<br> Please re-enter transaction password</b>";
                $payto = $_POST[paytoo];
                $payamt = $_POST[amt];
                $payacno= $_POST[payeeid];
        }*/
}
//$acc= mysql_query("select * from accounts where customer_id='$_SESSION[customer_id]'");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<script type="text/javascript">
function validateForm()
{
        var x=document.forms["form1"]["trpass"].value;
        var y=document.forms["form1"]["conftrpass"].value;

        if (x==null || x=="")
        {
                alert("Transaction password must be filled out.");
                return false;
        }
        if (y==null || y=="")
        {
                alert("Please confirm your tranaction password.");
                return false;
        }
        if (x !== y)
        {
                alert("Transaction passwords do not match.");
                return false;
        }
}
</script>
<link rel="stylesheet" type="text/css" href="../css/form_style_view.css">
<title></title>

<style type="text/css">
 div.c6 {width:372px;}
 div.c5 {border-top:1px solid #000;}
 div.c4 {text-align:right; border:0px;}
 div.c3 {border:0px; width:170px;}
 div.c2 {border:0px;}
 div.c1 {text-align:center; border:1px;}
</style>
</head>
<body>
<div id="templatemo_main">
<div id="templatemo_content">
<form id="form1" name="form1" method="post" action="accounttransfer3.php" onsubmit="return validateForm()">
<h2>Account Transfer 2:</h2>
<div class="m c6">
<div class="c1"><?php echo $error; ?></div>
<div class="c5">
<div class="l c2"><strong>Transfer To:</strong></div>
<div class="r c3"><?php echo $to; ?></div>
<div class="clear"></div>
<div class="l c2"><strong>Transfer Amount:</strong></div>
<div class="r c3"><?php echo number_format($amount,2); ?></div>
<div class="clear"></div>
<div class="l c2"><strong>Transfer From:</strong></div>
<div class="r c3"><?php echo $from; ?></div>
<div class="clear"></div>
<div class="l c2"><strong>Enter Transaction Password</strong></div>
<div class="r c3"><input name="trpass" type="password" id="trpass"></div>
<div class="clear"></div>
<div class="l c2"><strong>Confirm Password</strong></div>
<div class="r c3"><input name="conftrpass" type="password" id="conftrpass"></div>
<div class="clear"></div>
<div class="c4"><input type="submit" name="Transfer2" id="Transfer2" value="Transfer Funds"> <input type="button" onclick="window.location.href='transferfunds.php'" name="button" id="button"

value="Cancel"></div>
</div>
</div>
</form>
</div>
<div class="cleaner_h50"></div>
</div>
<!-- end of content -->
<div class="cleaner"></div>
<!-- end of main -->
<div id="templatemo_main_bottom"></div>
<!-- end of main -->
</body>
</html>

accounttransfer3.php
This file is supposed to show the Recipient's account number, old balance and now balance, but, it only shows one. It doesn't switch depending on the recipient.
Code:
<?php
session_start();
include("header.php");
require("dbconnection.php");
include("functions/inactive_session_logout.php");

$to = $_POST['accountnumber'];
$tranaction = mysql_query("SELECT * FROM transaction");

$trans = mysql_query("SELECT * FROM transaction WHERE transactionid");

while($rows = mysql_fetch_array($trans))
{
    $recipient = $rows['accountnumber'];
    $oldbal = $rows['oldaccountbalance'];
    $newbal = $rows['accountbalance'];
}
mysql_close($con);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="../css/form_style_view.css">
<title>Account Transaction 3</title>
</head>

<body>
<div id="templatemo_main">
  <span class="main_top"></span>
  <div id="templatemo_content">
    <h2>&nbsp; Transaction Detail:</h2>
    <div style="width:439px; height:70px; border:1px solid #000; text-align:center;">
      <h4>
        <?php
        echo "Account Transfer Complete Successful...";
        ?><br>
        <table width="513" border="1">
          <tr>
            <td><strong>Recipient:</strong></td>
            <td><?php echo $recipient; ?></td>
          </tr>
          <tr>
            <td><strong>Old Balance:</strong> </td>
            <td><?php echo $oldbal; ?></td>
          </tr>
          <tr>
            <td><strong>New Balance:</strong></td>
            <td><?php echo $newbal; ?></td>
          </tr>
        </table>
      </h4>
    </div>
    <div class="cleaner_h50"></div>
  </div><!-- end of content -->
  <div class="cleaner"></div>
</div><!-- end of main -->
<div id="templatemo_main_bottom"></div><!-- end of main -->
</body>
</html>

Please help. Thanks.
Thanks given by:
#2
RE: Banking System Help Needed
No SQL injection protection. Scary for a bank.
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS
Thanks given by:
#3
RE: Banking System Help Needed
You're not going to get any.

These boards (even though you've posted in the "Non Support" area) are mainly for ZPanel, Sentora and/or Linux issues.

If you need to get some code fixed fixed then I suggest you hire a PHP developer to get this done.

We're (the community) not here for you're personal gain.
***Retail***
SCPH-39002, Running FCMB, HDD-OSD, Mini-OPL.
SCPH-30002 RSW (Automobile Collection Snow White)
SCPH-10000 x2
SCPH-15000
SCPH-18000 x2
DESR-7700
SCPH-2040X x2
Linux Kit
PSBBN V0.20, V0.30
HDD Utility V1.00, V1.01

***Dev***
DTL-H30102 Running FCMB, HDD-OSD, Mini-OPL.
DTL-H20400 - Boxed
Thanks given by:
#4
RE: Banking System Help Needed
(10-19-2014, 09:00 PM)Nigel Wrote: You're not going to get any.

These boards (even though you've posted in the "Non Support" area) are mainly for ZPanel, Sentora and/or Linux issues.

If you need to get some code fixed fixed then I suggest you hire a PHP developer to get this done.

We're (the community) not here for you're personal gain.

I know this isn't for personal gain, that's why I posted in the Non-Support forum. I do, however, know that sometimes people WILL help, so, that's why I post, anyway.
Thanks given by:
#5
RE: Banking System Help Needed
Thread closed.
***Retail***
SCPH-39002, Running FCMB, HDD-OSD, Mini-OPL.
SCPH-30002 RSW (Automobile Collection Snow White)
SCPH-10000 x2
SCPH-15000
SCPH-18000 x2
DESR-7700
SCPH-2040X x2
Linux Kit
PSBBN V0.20, V0.30
HDD Utility V1.00, V1.01

***Dev***
DTL-H30102 Running FCMB, HDD-OSD, Mini-OPL.
DTL-H20400 - Boxed
Thanks given by: jacobg830
#6
RE: Banking System Help Needed
Yeah, as Me.B said, and I have mentioned before, this coding is so old and in secure it would take a team of developers to repair. I looked at it way back when and it is a mess Sad
You may want to try and look for another script to use. Something newer at least.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Payment Processor Installation Help Needed zHostingSolutions 1 5 ,598 06-25-2017, 01:16 AM
Last Post: TGates
To implement RMS system andrewhobbs 0 3 ,479 06-10-2016, 02:38 PM
Last Post: andrewhobbs
ftpcms - fast and light management system wormsunited 1 6 ,419 08-22-2014, 06:11 AM
Last Post: Me.B

Forum Jump:


Users browsing this thread: 2 Guest(s)