Ejemplo n.º 1
0
<?php

//die('roop');
include 'lib/function.php';
$objfunction = new scriptClass();
//print_r($objfunction);die;
$email = $_POST["email"];
$pass = $_POST["password"];
$emailExistance = $objfunction->checkEmailExist($email);
// Get Profile Details
if ($emailExistance) {
    // Check User is Exist or Not
    //    if($emailExistance['dbcsFacebookProfile'] !='' || $emailExistance['dbcsFacebookProfile']!=Null || $emailExistance['dbcsFacebookProfile']!='0'){
    $nickNameMsg = "Email" . " " . $email . " " . "already exists, please choose another";
} else {
    $setProfileData = $objfunction->createNewAccount($email, $pass);
    // Create new Account
}
if (isset($setProfileData)) {
    // Check Create New User or Not
    $array = array("Status" => "1", "Message" => "Congratulations on Hackathon women. Your account has been registered.", "ID" => $setProfileData, "code" => "200");
    $json = json_encode($array);
    //echo $json;
    header('Location: http://localhost.hackathonwomen.com/login.php');
} else {
}
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
Ejemplo n.º 2
0
    <?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');
}
?>