D
Deleted member 103
Guest
Hi,
can someone tell me why my script stops working? It worked fine until a few days ago at 1&1.
Now I only get the error "Internal Server Error".
can someone tell me why my script stops working? It worked fine until a few days ago at 1&1.
Now I only get the error "Internal Server Error".
B4X:
<?php
// Anfang
include("cnf/var.php");
// Ende
$con = mysql_connect($dbhost,$dbusername,$dbpassword) or die(mysql_error());
mysql_select_db($dbname) or die(mysql_error());
$query = file_get_contents("php://input");
$sth = mysql_query($query);
if (mysql_errno()) {
header("HTTP/1.1 500 Internal Server Error");
echo $query.'\n';
echo mysql_error();
}
else
{
if (isset($_GET["select"]))
{
$rows = array();
while($r = mysql_fetch_assoc($sth))
{
$rows[] = $r;
}
print json_encode($rows);
}
elseif (isset($_GET["insert"]))
{
print mysql_insert_id();
}
else
{
print $sth;
}
}
?>