-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_theatres.php
34 lines (26 loc) · 966 Bytes
/
get_theatres.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
31
32
33
34
<?php
session_start();
require_once "vendor/connect.php";
$place_num = $connect -> query("SELECT MAX(`site_id`) FROM `site`");
$place_count = $place_num -> fetch_assoc();
$_SESSION['place_count'] = $place_count['MAX(`site_id`)'];
//echo ($_SESSION['place_count']);
// $id3 = $connect -> query("SELECT * FROM `site` WHERE `site_id` = 3");
// $id3 = $id3 -> fetch_assoc();
// print_r(var_dump($id3));
for ($i=1; $i <= $_SESSION['place_count']; $i++) {
$get_site = $connect -> query("SELECT * FROM `site` WHERE `site_id` = '$i'");
$site = $get_site -> fetch_assoc();
if (isset($site)) {
$_SESSION['site'.$i] = array (
"id" => $site['site_id'],
"title" => $site['title'],
"city" => $site['city'],
"street" => $site['street'],
"house" => $site['house'],
"block" => $site['block'],
);
//print_r($_SESSION['site'.$i]['id']);
}
}
?>