Example #1
0
session_start();
include_once 'class_user.php';
$user = new User();
$id = $_SESSION['id'];
if (!$user->get_session()) {
    header("location:login.php");
}
if (isset($_GET['q'])) {
    $user->user_logout();
    header("location:login.php");
}
$addinfo = new User();
if (isset($_POST['subRealInfo'])) {
    extract(array_map("htmlspecialchars", $_POST), EXTR_OVERWRITE, "form_");
    $add = $addinfo->AddInfo($name, $culture, $area);
    if ($add) {
        echo "Done. Information added successfully!";
    } else {
        echo 'Something went wrong';
    }
}
?>
<!DOCTYPE HTML >
<html>
<head>
<title>Add info - real estate</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>