-
Notifications
You must be signed in to change notification settings - Fork 0
/
transaction.php
33 lines (33 loc) · 1.28 KB
/
transaction.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
<?php session_start();?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Transaction</title>
<link href="style.css" rel="stylesheet">
</head>
<body style="margin:4%;"><?php
$from = $_SESSION['id'];
?><form action="view_transfer.php" method="post" name="transaction">
<h1>Amount to be transfered: </h1>
<input type="number" name="amount" required style="font-size: x-large; padding:1%; margin:2%; border-radius: 20px;">
<input type="hidden" name="from" value="<?php echo $from ?>">
<br><br><br>
<h1>Whom to transfer your money?</h1>
<select name="receiver" style="font-size: x-large; padding:1%; margin:2%; cursor:pointer;">
<!-- <option value="" disabled selected>Receiver ID => Name</option> -->
<?php
include 'connect.php';
$query="SELECT * from customers where ID<>'$from'";
$conn=mysqli_query($db_connect,$query);
while($row = mysqli_fetch_assoc($conn)){
echo "<option value={$row['ID']}>".$row['ID']." => ".$row['name'] ."</option>";
}
?>
</select>
<br><br><button type='submit'>Transfer</button>
</form>
</body>
</html>