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