Hi,
after the change from PHP 7.4 to PHP 8.0+ my script does not work again.
Since I don't know PHP, I need help from someone who does.
The only error message I can see is this:
Why the URL is suddenly no longer valid is not clear to me.
after the change from PHP 7.4 to PHP 8.0+ my script does not work again.
Since I don't know PHP, I need help from someone who does.
B4X:
<?php
// Anfang
include("cnf/var.php");
// Ende
$conn = new mysqli($dbhost,$dbusername,$dbpassword,$dbname);
$query = file_get_contents("php://input");
if (mysqli_errno()) {
header("HTTP/1.1 500 Internal Server Error");
echo $query.'\n';
echo mysqli_error();
}
else
{
$result = $conn->query($query);
if (isset($_GET["select"]))
{
$rows = array();
while($r = $result->fetch_assoc()) {
$rows[] = $r;
}
print json_encode($rows);
}
elseif (isset($_GET["insert"]))
{
print $conn->insert_id;
}
else
{
print $sth;
}
}
?>
The only error message I can see is this:
Why the URL is suddenly no longer valid is not clear to me.