/
mylogin.php
50 lines (32 loc) · 1.36 KB
/
mylogin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
session_start();
include 'lib/function.php';
$objfunction = new scriptClass(); // Create Class Object
$email = trim($_REQUEST['email']);
$pass = trim($_REQUEST['password']);
$resultval[0] = filter_var($email, FILTER_VALIDATE_EMAIL);
//----------------------------------------- Check Mandatory Field-----------------------------//
//----------------------------------------- END----------------------------------------------//
$getprofiledata = $objfunction->getProfileDetails($email, $pass); // Get Profile Details
$_SESSION['uid']= $getprofiledata['userID'];
//print"<pre>";print_r($getprofiledata);print"</pre>"; die;
if (!$getprofiledata) { // Check User is Exist or Not
$array = array(
"Status" => "0",
"Message" => "Invalid Email and Password",
"code" => "198"
);
$json = json_encode($array);
echo $json;
return;
}
else {
$array = array(
"Status" => "1",
"code"=>"200"
);
$json = json_encode($array);
// echo $json;
header('Location: http://localhost.hackathonwomen.com/dashboard.php');
}
?>