Server Admin

Viewing: planbuy.php

<?php
session_start();

include 'db.php';
$id = $_GET['id'];
$uemail = $_SESSION['login'];
if($_SESSION['active']==1 ){
    
     echo "<script>alert('Already Have Plan');</script>";
     header ("plans.php");
     die;
    
}
                    
                    if($_SESSION['login'] ){
                        
                       $query = "UPDATE `users` SET plantype=$id WHERE EmailId='$uemail'";
                         
                         $result = mysqli_query($conn,$query);
                       
                        if($result)
                        {
                        echo "<script>alert('Plan Added ');</script>";
                        header("profile.php");
                        }
                        else 
                        {
                        echo "<script>alert('Something went wrong. Please try again');</script>";
                        }

                    }
                   else {
                       header("Location:preg.php?id=".$id."");
 }

                   



?>


                  







<?php
include 'header.php';
include 'footer.php'; 

?>
Back to File Manager