lire ce que contient un tableau
Posté : 18 févr. 2010, 21:44
Bonjour
Je n'arrive pas à lire le contenu d'un tableau.
Ma classe User
Je n'arrive pas à lire le contenu d'un tableau.
Ma classe User
<?php
class User{
private $tab;
private $lastLogin;
public function __construct ($login,$pwd){
$this->tab=array("login"=>$login,"mdp"=>md5($pwd));
return $this->tab["mdp"];
//$this->lastLogin=time();
}
public function getLastLogin(){
}
public function Verif(){
}
}
?>
et <?php
include ("./tab.php"); // contient ma class User
include ("./config.php");
include ("./connex1.php");
$_POST['login']="Admin";
$_POST['pwd']="0000";
// Simulation d'utilisateurs
if (isSet($_POST['login'])&& isSet($_POST['pwd'])){
$User=new User($_POST['login'],$_POST['pwd']); // Initialisation des identifiants.
$database= new Mysql ($serveur,$login,$mdp,$database); //Initialisation des variables et connexion auto à la BDD
echo"</br>";
}
?>
J'ai une belle page blache qui s'affiche sur l"cran