-
Notifications
You must be signed in to change notification settings - Fork 1
/
viewhome.php
30 lines (30 loc) · 890 Bytes
/
viewhome.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
if(isset($_GET['id'])):
include "check_login.php";
include "error.php";
$val=check();
$conn = new DBase("brokfree");
$pdo=$conn->pdo;
if($val):
$s1=new Stmt($pdo);
$sql="SELECT username from users where email=:email";
$email=$_SESSION['email'];
$arr=['email'=>$email];
$s1=$s1->run($sql,$arr);
$row=$s1->fetch();
$username=$row['username'];
endif;
$s1=new Stmt($pdo);
$sql='SELECT * FROM housedata WHERE id_house=:id';
$s1=$s1->run($sql,$_GET);
$row=$s1->fetch();
ob_start();
include "templates/view-home.html.php";
$out=ob_get_clean();
echo $out;
else:
ob_start();
include "templates/error.html";
$out=ob_get_clean();
echo $out;
endif;