ok, allora, ho provato così:
Codice PHP:
$db_host = "xxxxxxx";
$db_user = "xxxxxxxx";
$db_password = "xxxxxxx";
$db_name = "xxxxxxxx";
$db = mysql_connect($db_host, $db_user, $db_password);
mysql_select_db($db_name, $db);
$query = "SELECT numero_download FROM tts_counter WHERE nome_programma='xprivacy'";
$result = mysql_query($query, $db);
$row = mysql_fetch_array($result);
// prende l' attuale numero di download e poi lo incrementa di uno
$download = $row[numero_download];
$download++;
// aggiornamento conteggio download
$query2 = "UPDATE `tts_filecounter` SET `numero_download` = '$download' WHERE `ID` =1;";
$result2 = mysql_query($query2, $db);
mysql_close($db);
// fa partire il download effettivo
header("Location: http://www.thetotalsite.it/Sct/Informatica/programmazione/prg/xprivacy/betas/XPrivacyNitrogenBeta2b_Setup.exe");
Il problema è che mi da questi due errori:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/thetotalsite.it/Sct/Informatica/programmazione/prg/xprivacy/download.php on line 24
Warning: Cannot modify header information - headers already sent by (output started at /home/thetotalsite.it/Sct/Informatica/programmazione/prg/xprivacy/download.php:10) in /home/thetotalsite.it/Sct/Informatica/programmazione/prg/xprivacy/download.php on line 38
Che fare?