ho provato così (premetto che è la prima volta che mi cimento a scrivere php) sul tuo modello, è corretto?
Codice PHP:
<?
if(isset( $_GET['giorno1'],
$_GET['giorno2'],
$_GET['giorno3'],
$_GET['giorno4'],
$_GET['max1'],
$_GET['max2'],
$_GET['max3'],
$_GET['max4'],
$_GET['min1'],
$_GET['min2'],
$_GET['min3'],
$_GET['min4'],
$_GET['vento1'],
$_GET['vento2'],
$_GET['vento3'],
$_GET['vento4'],
)
{
$giorno1 = strip_tags($_GET['giorno1']);
$giorno2 = strip_tags($_GET['giorno2']);
$giorno3 = strip_tags($_GET['giorno3']);
$giorno4 = strip_tags($_GET['giorno4']);
$max1 = strip_tags($_GET['max1']);
$max2 = strip_tags($_GET['max2']);
$max3 = strip_tags($_GET['max3']);
$max4 = strip_tags($_GET['max4']);
$min1 = strip_tags($_GET['min1']);
$min2 = strip_tags($_GET['min2']);
$min3 = strip_tags($_GET['min3']);
$min4 = strip_tags($_GET['min4']);
$vento1 = strip_tags($_GET['vento1']);
$vento2 = strip_tags($_GET['vento2']);
$vento3 = strip_tags($_GET['vento3']);
$vento4 = strip_tags($_GET['vento4']);
$stringa1="&giorno1=" . $giorno1 . "&giorno2=" . $giorno2 . "&giorno3=" . $giorno3 . "&giorno4=" . $giorno4;
$stringa2="&max1=" . $max1 . "&max2=" . $max2 . "&max3=" . $max3 . "&max4=" . $max4;
$stringa3="&min1=" . $min1 . "&min2=" . $min2 . "&min3=" . $min3 . "&min4=" . $min4;
$stringa4="&vento1=" . $vento1 . "&vento2=" . $vento2 . "&vento3=" . $vento3 . "&vento4=" . $vento4;
$fp = fopen("bari.txt", "w") or die ("Impossibile aprire il file");
fwrite($fp, $stringa1, $stringa3, $stringa4);
fclose($fp);
}
?>