Mini Shell
<?php
include '../db/database.php';
include 'function_editdate.php';
$historycrownID = $_POST['id'];
$sql = "SELECT * FROM history_crown AS t1 LEFT JOIN crown AS t2 ON (t1.crownID = t2.crownID)
WHERE (`historycrownID`='$historycrownID') ";
$result = mysqli_query($link, $sql);
while($row = mysqli_fetch_array($result)){
$rowdate = $row['date'];
$rowdate1 = mydatesql($rowdate);
$arr[] = array(
"historycrownID"=>$row['historycrownID'],
"teachercrID"=>$row['teachercrID'],
"crownID"=>$row['crownID'],
"year"=>$row['year'],
"date"=>$rowdate1
);
}
$json = json_encode($arr[0]);
echo $json;
?>
Zerion Mini Shell 1.0