55ok

Mini

Direktori : /home/bestphotography/www/Admin/
Upload File :
Current File : /home/bestphotography/www/Admin/infoevents.php

<?php
ini_set('memory_limit','2048M');
ini_set('max_execution_time', '0'); // for infinite time of execution
// Initialize the session
session_start();
include "config.php";
$bid = $_POST['bid'];
$sql = "select * from book_now where bid=".$bid;
$result = mysqli_query($conn,$sql);
$response = "<div>";
$response = "<table border='0' class='table table-bordered' width='100%'>";
while( $row = mysqli_fetch_array($result) ){
 $arr = json_decode($row['events'], false);
 if (count($arr) > 0) {
	 $response .= "<th valign='top'>#</th><th valign='top'>Event</th><th valign='top'>Date</th><th valign='top'>Location</th>";
	 for($i=0;$i<count($arr);$i++){
		$sno = $i+1;
		$event =  $arr[$i]->Event;
		$edate =  $arr[$i]->EDate;
		$location =  $arr[$i]->Location;
		$response .= "<tr>";
		$response .= "<td>".$sno."</td>";
		$response .= "<td>".$event."</td>";
		$response .= "<td>".$edate."</td>";
		$response .= "<td>".$location."</td>";
		$response .= "</tr>";
	 }
 } else {
	 $response .= "<tr align='center'><td colspan='4' style='padding-top:40px;padding-bottom:40px;'><h1>There is no data in this person.</h1>.</td></tr>";
 }
}
$response .= "</table>";
echo $response;
echo "</div>";
exit;
?>

Zerion Mini 1.0