ich habe ein kleines Problem mit einem PHP Script
PHP:
PHP Code:
<?php
$host = "localhost";
$user = "username";
$pass = "password";
$datab = "db";
$table = "Programme";
$PId = addslashes($_GET['id']);
$db = @mysql_connect($host, $user, $pass);
if ($db)
{
if (@mysql_select_db($datab, $db))
{
$query = "UPDATE $table SET Downloads = Downloads + 1 WHERE ProgramID = '$PId'";
@mysql_query($query);
if (mysql_affected_rows() == 0)
{
exit(0);
}
$result = mysql_query("SELECT DownloadUrl FROM Programme WHERE ProgramID = '$PId'");
$dlurl = mysql_result($result,0,0);
}
}
header("Location: ". $dlurl);
exit;
?>
PHP Code:
CREATE TABLE `Programme`
(
`Name` TEXT DEFAULT NULL,
`DownloadUrl` TEXT DEFAULT NULL,
`ProgramID` bigint(20) DEFAULT NULL,
`Downloads` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Server: Ubuntu 14.04 / Apache / PHP5 / MYSQL 5.5.44
Beim Aufruf bleibt die Seite weiß (Kein Download / Kein Fehler)
Kann mir da jemand helfen?






