File: ajax/validate_login.php

Recommend this page to a friend!
  Classes of Ankit Jain  >  Registration Module  >  ajax/validate_login.php  >  Download  
File: ajax/validate_login.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Registration Module
Register and login users in MySQL database records
Author: By
Last change:
Date: 3 years ago
Size: 490 bytes
 

Contents

Class file image Download
<?php

namespace AnkitJain\RegistrationModule;
require (
dirname(__DIR__) . '/vendor/autoload.php');
use
AnkitJain\RegistrationModule\Login;

if(isset(
$_POST['q']))
{
   
$loginField = json_decode($_POST['q']);
   
$login = $loginField->login;
   
$password = $loginField->password;
   
$obLogin = new Login();
   
$data = array(
       
'login' => $login,
       
'passLogin' => $password
   
);
   
$result = $obLogin->authLogin($data);
    if(isset(
$result))
        echo
$result;
    else
        echo
json_encode([]);
}


For more information send a message to info at phpclasses dot org.