MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 8.0.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/www/imenso.co/dev/mps-analytics/assets/login_code.php
<?php 
  session_start();
  if(isset($_POST['email']) && isset($_POST['password']) && !empty($_POST['email']) && !empty($_POST['password']))
  {
    // die('dfdsf');
      $json = file_get_contents("data.json");

      $data = json_decode($json);


      foreach ($data as $datas) 
      {
        $email = $datas->email;
        $password = $datas->password;
        if($_POST['email']==$email && $_POST['password']==$password && !empty($_POST['email']) && !empty($_POST['password'])) 
        {        
          $_SESSION['success'] = 'Login Successfully';
          header('location:index.php');
        }
        elseif(empty($_POST['email']) && empty($_POST['password']))
        {
          $_SESSION['error'] = 'Please enter email and password';
          header('location:index.php');
        }
        else
        {
          $_SESSION['error'] = 'Email or password is invailid';
          header('location:index.php');
        }
    }

  }

 ?>