- Codice: Seleziona tutto
<?
$nome = $_POST["nome"]; // recupera il nome
$email = $_POST["email"]; // recupera l' e-mail
$cognome = $_POST["cognome"]; // recupera il cognome
//Apro il file ip.html, se non esiste lo creo
$apro=fopen('ip.html', 'a+');
//Scrivo nel file aperto i dati
fwrite($apro, "<tr><td>" . $nome . "</td><td>" . $email . "</td><td><center>" . $cognome. "</td><td><center>" . $data_giorno . "</center></td><td><center>" . $data_ora . "</center></td></tr>");
//Chiudo la connessione aperta
fclose($apro);
Il modulo è il solito:
- Codice: Seleziona tutto
<html>
<head>
<title> Registrazione </title>
</head> <body>
<table> <tr> <td> <form action="registrazione.php" method="post"> Nome </td> <td> <input type="text" name="nome"> </td> </tr>
<tr> <td> Cognome </td> <td> <input type="text" name="cognome"> </td> </tr>
<tr> <td> E-Mail</td> <td> <input type="text" name="email"> </td> </tr>
<tr> <td> Password </td> <td> <input type="password" name="password"> </td> </tr>
<tr> <td> Ripeti Password </td> <td> <input type="password" name="password2">
<input type="submit" class="submit" name="Invia" value="Invia registrazione">
</form> </td> </tr>
</body>
Grazie in anticipo per l' aiuto che mi darete (almeno spero che me lo darete)