forked from g33kyrash/Online-Banking-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer_transfer.php
81 lines (65 loc) · 2.38 KB
/
customer_transfer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
session_start();
if(!isset($_SESSION['customer_login']))
header('location:index.php');
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Transfer Funds</title>
<link rel="stylesheet" href="newcss.css">
<style>
.content_customer table,th,td {
padding:6px;
border: 1px solid #2E4372;
border-collapse: collapse;
text-align: center;
}
.content_customer td{
padding:10px;
}
.head{
text-align:center;
color:#2E4372;
font-weight:bold;
}
</style>
</head>
<?php include 'header.php' ?>
<div class='content_customer'>
<?php include 'customer_navbar.php'?>
<div class="customer_top_nav">
<div class="text">Welcome <?php echo $_SESSION['name']?></div>
</div>
<br><br><br><br>
<h3 style="text-align:center;color:#2E4372;"><u>Transfer Funds</u></h3>
<?php
include '_inc/dbconn.php';
$sender_id=$_SESSION["login_id"];
$sql="SELECT * FROM beneficiary1 WHERE sender_id='$sender_id' AND status='ACTIVE'";
$result= mysql_query($sql);
$rws=mysql_fetch_array($result);
$s_id=$rws[1];
?>
<?php
if($sender_id==$s_id)
{
echo "<form action='customer_transfer_process.php' method='POST'>";
echo "<table align='center'>";
echo "<tr><td>Select Beneficiary:</td><td> <select name='transfer'>" ;
$sql1="SELECT * FROM beneficiary1 WHERE sender_id='$sender_id' AND status='ACTIVE'";
$result= mysql_query($sql);
while($rws=mysql_fetch_array($result)) {
echo "<option value='$rws[3]'>$rws[4]</option>";
}
echo "</td></tr></select>";
echo "<tr><td>Enter Amount: </td><td><input type='number' name='t_val' required></td></table>";
echo "<table align='center'><tr><td style='padding:5px;'><input type='submit' name='submitBtn' value='Transfer' class='addstaff_button'></td></tr></table></form>";
}
else{
echo "<br><br><div class='head'><h3>No Benefeciary Added with your account.</h3></div>";
}
?>
</div>
<?php include 'footer.php'; ?>