Created
January 13, 2015 19:30
-
-
Save anonymous/869feb24ffb714dbebf0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use databasephp\DatabaseConnection as datab; | |
use logincrudphp\login as logi; | |
require_once('src/databasephp/DatabaseConnection.php'); | |
require_once('src/logincrudphp/login.php'); | |
session_start(); | |
$dataobj = new datab(); | |
$handle = $dataobj->gethandle(); | |
$logobj = new logi($handle); | |
$tname = 'teeyli_'.$_GET['name'].'_details'; | |
if( isset($_POST['submit'] ) ) | |
{ | |
if($logobj->verify_credentials($_POST['login_id'], $_POST['login_password'], $tname ) ) | |
{ | |
if($_GET['name']=="user") | |
{ | |
$_SESSION['u_login_id'] = $_POST['login_id']; | |
header("Location:user/u_home.php"); | |
} | |
else if($_GET['name']=="store") | |
{ | |
$_SESSION['s_login_id'] = $_POST['login_id']; | |
header("Location:store_owner/so_home.php"); | |
} | |
else if($_GET['name']=="interior") | |
{ | |
$_SESSION['i_login_id'] = $_POST['login_id']; | |
//echo "<script> window.location="interior_designer/id_home.php"; </script>"; | |
header("Location:interior_designer/id_home.php"); | |
} | |
else if($_GET['name']=="admin") | |
{ | |
$_SESSION['a_login_id'] = $_POST['login_id']; | |
header("Location:admin/a_home.php"); | |
} | |
//exit; | |
} | |
else | |
{ echo "<script>alert('Invalid Login');</script>"; | |
} | |
//unset($_POST['submit']); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
check in network