Server Admin

Viewing: verify.php

<?php  
include 'db.php';
if(isset($_REQUEST['token']))
{
        $token=$_REQUEST['token'];
        $sql_query = "select * from users where token='".$token."'";
        $result = mysqli_query($conn,$sql_query);
        $row = mysqli_fetch_array($result);
        $count = $row['FullName'];
       
        if($count){
          $sql_query = "update users set email_verification=1,token=NULL where token='".$token."'";
          $result = mysqli_query($conn,$sql_query);
          echo "<script>alert('Email verification is successfull. You can login now.');</script>";
          header("location:howtopay.php?verification=1");

          } 
        else{
           echo "<script>alert('Invalid Details');</script>";
        }

      }
      echo "Invalid Link";

?>
Back to File Manager