File: ajax/validate_register.php

Recommend this page to a friend!
  Classes of Ankit Jain  >  Registration Module  >  ajax/validate_register.php  >  Download  
File: ajax/validate_register.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: 663 bytes
 

Contents

Class file image Download
<?php

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

if(isset(
$_POST['q']))
{
   
$registerField = json_decode($_POST['q']);
   
$name = $registerField->name;
   
$email = $registerField->email;
   
$username = $registerField->username;
   
$mob = $registerField->mob;
   
$password = $registerField->password;
   
$obRegister = new Register();
   
$data = array(
       
'name' => $name,
       
'email' => $email,
       
'username' => $username,
       
'passRegister' => $password,
       
'mob' => $mob
   
);
   
$result = $obRegister->authRegister($data);
    if(isset(
$result))
        echo
$result;
    else
        echo
json_encode([]);
}



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