allora mi sono documentato
e ho fatto così:
file logg.htm
codice:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Nuova pagina 1</title>
</head>
<body>
<form method="GET" action="logging.php">
</p>
<input type="text" name="username" size="20"></p>
</p>
<input type="submit" value="Invia" name="B1"></p>
</p>
</p>
</form>
</body>
</html>
file logging.php :
codice:
<?php
$username=$_GET['username'];
$ora = date ("H:i:s");
$data = date ("d/m/Y");
$stringa = "$data - $ora - User $username is logged \n";
// Stringa da scrivere su file
// Scrittura del file
$scrivi_file=fopen("LOG.txt","a");
fwrite($scrivi_file,$stringa);
fclose($scrivi_file);
?>
funziona se apro col browser logg.htm e inserisco nel campo testo ciò che mi interessa e poi premo il tasto invia
ma adesso mi servirebbe farlo funzionare così: http://www.miosito.it/logg.htm?username=pippo
come posso farlo?
Grazie