-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrans4.php
43 lines (30 loc) · 1017 Bytes
/
trans4.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
<?php
session_start();
if(!isset($_SESSION['accountno']))
{
header('location: cust_login.php');
}
error_reporting( ~E_DEPRECATED & ~E_NOTICE );
ini_set('display_errors', 1);
$flagt =$_SESSION['accountno'];
$flag1t= $_SESSION['acc3'];
$flag2t=$_SESSION['amm3'];
if($flag1t==NULL)
{
$flag1t="no trans!";
$flag2t=0;
}
// Create connection
$connt = new mysqli("localhost", "root", "koti", "banking");
// Check connection
if ($connt->connect_error) {
die("Connection failed: " . $connt->connect_error);
}
$resultt1 = "update transactions set acc4='$flag1t' where person='$flagt'";
$resultt2 = "update transactions set amm4=$flag2t where person='$flagt'";
if ($connt->query($resultt1) === TRUE&&$connt->query($resultt2) === TRUE) {
header('Location: trans5.php');
} else {
echo "Error in updating password, try again!" . $resultt . "<br>" . $conn->error;
}
?>