?php
$textfile = fopen("iscritti.txt", "r");
while ( $rigafile = fgets($textfile,1024)) {
$campiriga = explode("|", $rigafile);
$idriga = $campiriga[0];
.....
$cid = $campiriga[0];
$cnome = $campiriga[1];
$ccognome = $campiriga[2];
$cemail = $campiriga[7];
}
}
fclose($textfile);
?>
<body>
<form method="post" action="http://localhost/prova/update.php">
ID: <input type="text" size="10" name="id"value="<?=$cid ?>"><br>
Nome: <input type="text" size="10" name="nome"value="<?=$cnome?>"><br>
Cognome <input type="text" size="10" name="cognome"value="<?=$ccognome?>"><br>
Email <input type="text" size="10" name="email"value="<?=$cemail?>"><br>
<input type="submit" value="Modifica">
</form>
</body>
nn so come modificare il codice per far vedere tutte le righe
$textfile = fopen("iscritti.txt", "r");
while ( $rigafile = fgets($textfile,1024)) {
$campiriga = explode("|", $rigafile);
$idriga = $campiriga[0];
.....
$cid = $campiriga[0];
$cnome = $campiriga[1];
$ccognome = $campiriga[2];
$cemail = $campiriga[7];
}
}
fclose($textfile);
?>
<body>
<form method="post" action="http://localhost/prova/update.php">
ID: <input type="text" size="10" name="id"value="<?=$cid ?>"><br>
Nome: <input type="text" size="10" name="nome"value="<?=$cnome?>"><br>
Cognome <input type="text" size="10" name="cognome"value="<?=$ccognome?>"><br>
Email <input type="text" size="10" name="email"value="<?=$cemail?>"><br>
<input type="submit" value="Modifica">
</form>
</body>
nn so come modificare il codice per far vedere tutte le righe