Exemple #1
0
<?php

include_once '../classes/realestate.php';
if (!isset($_SESSION['secour']) && $_SESSION['secour'] != 'secour') {
    header("Location:../index.php");
}
//echo session_status();
$obj = new realestate();
if (isset($_GET['logout'])) {
    $obj->logout();
}
if (isset($_POST['submit'])) {
    if (isset($_GET['forget'])) {
        $param = array('user_name' => $_POST['name'], 'user_email' => $_POST['email']);
        $result = $obj->pass_update($param);
        if ($result == TRUE) {
            $forgetmsg = 'Your new password sent on your Reg. email';
        }
    } else {
        $param = array('user_name' => $_POST['name'], 'user_password' => $_POST['password']);
        $result = $obj->login($param);
    }
}
//echo $_SESSION['post_id'];
?>
<!DOCTYPE html>
<!--
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.
-->