Skip to content

Instantly share code, notes, and snippets.

Created January 13, 2015 19:30
Show Gist options
  • Save anonymous/869feb24ffb714dbebf0 to your computer and use it in GitHub Desktop.
Save anonymous/869feb24ffb714dbebf0 to your computer and use it in GitHub Desktop.
<?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']);
}
?>
@balramkhichar
Copy link

check in network

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment