-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbkash_verify.php
38 lines (38 loc) · 1.15 KB
/
bkash_verify.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
<?php
$error=''; //Variable to Store error message;
$disabled='disabled';
$disabled1='';
if(isset($_POST['submit']))
{
if(empty($_POST['trnx_id']))
{
$error = "Please enter the transaction id";
}
else
{
//Define $user and $pass
$trnx_id=$_POST['trnx_id'];
//Establishing Connection with server by passing server_name, user_id and pass as a patameter
$conn = mysqli_connect("localhost", "root", "");
//Selecting Database
$db = mysqli_select_db($conn, "bus_service");
//sql query to fetch information of registerd user and finds user match.
$query = mysqli_query($conn, "SELECT * FROM seat_reservation WHERE trnx_id='$trnx_id'");
$rows = mysqli_num_rows($query);
if($rows == 1)
{
$error = "Thank you, your payment has been confirmed. Now click on <label class='btn-sm btn-primary'>Ticket</label> button for your ticket.";
$disabled='';
$disabled1='disabled';
//header("Location:ticket.php"); // Redirecting to other page
}
else
{
$error = "Transaction id does not match.";
$disabled='disabled';
$disabled1='';
}
mysqli_close($conn); // Closing connection
}
}
?>