I have written a code that outputs all termins i have the day. The calendar for this is already finished. But the program output, I want to use with python don't work.
My code:
<?php
mysql_connect(deleted);
mysql_select_db("DB1367141")
$day = date("d");
$month = date("m");
$year = date("Y");
$result = mysql_query("SELECT * FROM entries WHERE day = '$day' AND month = '$month' AND year = '$year' ORDER BY hour DESC, minute");
$array = {};
while($obj = mysql_fetch_object($result))
{
if($obj->hour != "--")
$hour = splitf("%02d", $obj->hour);
else
$hour = $obj->hour;
if($obj->minute != "--")
$minute = splitf("%02d", $obj->minute)
else
$minute = $obj->minute;
array_push($array, {"hour":$hour, "minute":$minute, "text":$obj->tex});
}
var_dump($array);
echo json_encode($array);
?>
But if i run it, it neither outputs the array than an "echo('hi');"
I tried out to put this echo at the begin, at the end and in the middle. But the output is the same: nothing
In another forum I found out that I have to write:
$array = array();
But the output is the same: nothing.
i tryed both, right syntax and error report. as i changed $array = array(); nothing changed. i added two lines in my .htaccess to get better error report, and it outputed a 500 Internal Server Error.