<?php
date_default_timezone_set('asia/kolkata');
require_once '../class/ClassForm.php';

$state = $_POST['formMode']; 
$user_Name = $_POST['c_name'];
$email_id = $_POST['c_email'];
$user_pwds = $_POST['c_pwd'];
$user_role = $_POST['c_role'];
$mobile = $_POST['c_mobile'];

if($state == 'insert'){
    $entry = array(
        'id' => 0,
        'email_id' => $email_id,
        'user_Name' => $user_Name,
        'user_pwds' => $user_pwds,
        'user_role' => $user_role,
        'mobile' => $mobile,
        'state' => 1
    );
    $status = $ClassForm->f_mysql_insert_array('login_info', $entry);
    if(!$status['mysqli_error']){
        $return_array = array(
            'status_code' => '1',
            'status_info' => 'client created successfully..'
        );
        echo $jsonformat = json_encode($return_array);
        exit;
    }
    else{
        $return_array = array(
            'status_code' => '0',
            'status_info' => 'client creation Failed. Please Contact Supporting Team'
        );
        echo $jsonformat = json_encode($return_array);
        exit;
    }
}
else if($state == 'update'){

}
else if($state == 'select'){
    $Authenticate = "select * from login_info where email_id ='1' ";
    $Access = $ClassForm->Fetch_Result_Set($Authenticate);
    
}

?>