-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdef.php
More file actions
24 lines (22 loc) · 695 Bytes
/
def.php
File metadata and controls
24 lines (22 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
require_once 'Utilisateur.class.php';
$u = new Utilisateur('Ali', '123456');
$u->setDate(date_create("200-03-15"));
$u->setSexe('M');
$j = new Utilisateur('jacob', 'asdfgh');
$j->setDate(date_create("1980-06-10"));
$j->setSexe('M');
$lst = array($u, $j, new Utilisateur('mathieu', 'qwerty'));
$lst[3] = new Utilisateur('france', 'azerty');
$rep = '';
function chercherUser ($username, $pass){
$maliste = $GLOBALS["lst"];
for ($i = 0; $i <count($maliste); $i++){
$usr = $maliste[$i];
if ($username == $usr->getNom()){
return $i;
}
}
return -1;
}
?>