JezK
Edit File: reviewNew.php
<?php session_start(); include("./app/admin_functions.php"); $connect = new admin(); $connect->dbconnection(); if (isset($_SESSION['registrationID'])) { //Assign Pre-Registration amount here. $_SESSION['amount'] = 1000; $registrationID = $_SESSION['registrationID']; $result = $connect->checkPaymentStatus($registrationID); $text = "You Already Payed"; if ($result == 1) { //echo "<script>alert('You already payed');</script>"; $text = '<div class="text-center" > <h1 style="color:#4CAF50;">You Already Payed</h1> </div>'; unset($_SESSION['registrationID']); unset($_SESSION['amount']); //unset($_SESSION['email']); } else { $text = '<div class="text-center"> <h2>Click </h2> </div> <form class="mui-form row" method="POST" action="index.php"> <input type="submit" name="Pay" value="Pay" id="b1" class="subBt"> </div> </form> </div>'; } if (isset($_SESSION['registrationSuccess'])) { if (!isset($_SESSION['paymentDone'])) { echo "<script>alert('Registration completed successfully. Please pay to continue.')</script>"; echo "<script>document.getElementById('b1').onclick = function(){ swal('Here s a message!'); };</script>"; } unset($_SESSION['registrationSuccess']); unset($_SESSION['paymentDone']); } } else { header('Location: registration.php'); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="format-detection" content="telephone=no" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>:: Registration</title> <link rel="stylesheet" type="text/css" media="all" href="css/styles_slider.css"> <!-- Bootstrap Core CSS --> <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <!-- Theme CSS --> <link href="css/freelancer.css" rel="stylesheet"> <link href="css/mui.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/responsiveCarousel.min.js"></script> <script type="text/javascript" src="js/mui.js"></script> <script type="text/javascript" src=""></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <link rel="stylesheet" href="https://cdn.rawgit.com/t4t5/sweetalert/v0.2.0/lib/sweet-alert.css"> <script src="https://cdn.rawgit.com/t4t5/sweetalert/v0.2.0/lib/sweet-alert.min.js"></script> <style> body { background: url("images/bg11.jpg"); } .example button { float: left; background-color: #4E3E55; color: white; border: none; box-shadow: none; font-size: 17px; font-weight: 500; font-weight: 600; border-radius: 3px; padding: 15px 35px; margin: 26px 5px 0 5px; cursor: pointer; } .example button:focus{ outline: none; } .example button:hover{ background-color: #33DE23; } .example button:active{ background-color: #81ccee; } </style> </head> <body id="page-top" class="index"> <!-- Navigation --> <nav id="mainNav" class="navbar navbar-default navbar-fixed-top navbar-custom"> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="logo"> <a class="navbar-brand navbar-brand-cstm" href="index.php"> <img src="images/logo.png" class="logres"> </a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <!-- <div class="pull-right"> <a href=""> <img src="images/register-now.png" class="reglogo"></a> </div>--> </div> <!-- /.navbar-collapse --> </div> <!-- /.container-fluid --> </nav> <!--form Grid Section --> <section id="aboutus" class="slider"> <div class="container"> <div class="row1"> <div class="col-sm-8 col-sm-offset-2 div_border"> <?php echo $text; ?> </div> </div> </div> </section> </body> </html>