Fix costrutto + inserimento id nella tabella
This commit is contained in:
16
index.php
16
index.php
@@ -1,15 +1,14 @@
|
||||
<?php
|
||||
class User{
|
||||
private $id;
|
||||
private $name;
|
||||
private $email;
|
||||
/*
|
||||
function set_details($id, $name, $email){
|
||||
public $id;
|
||||
public $name;
|
||||
public $email;
|
||||
|
||||
function __construct($id, $name, $email){
|
||||
$this->id = $id;
|
||||
$this->name = $name;
|
||||
$this->email = $email;
|
||||
}
|
||||
*/
|
||||
}
|
||||
$file = fopen("data/clienti.csv", "r") or die("Non riesco a leggere il file, controlla che esista brutto rimbambito");
|
||||
$utenti = [];
|
||||
@@ -37,6 +36,11 @@ fclose($file);
|
||||
<th>Email</th>
|
||||
<th>Link del cazzo</th>
|
||||
</tr>
|
||||
<?php
|
||||
for($i=0; $i<count($utenti); $i++){
|
||||
echo "<tr><td>" . $utenti[$i]->id . "</td></tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user