[SIZE=3]<?php
class user {
public $name;
public $email;
public $password;
public $account;
public $service; //Multdimension Array
function user($name, $password){
if(login($name, $password)){ // Hii Line inaleta Error kwamba Login() sija i define wakati ipo juu
setEmail();
setPassword();
setAccount();
setService();
echo'Login Successfull !';
}
}
function setEmail(){
$this email= getEmail from db();
}
function setPassword(){
$this password= getPassword from db();
}
function setAccount(){
$this account= getAccount from db();
}
function setService(){
$this service= getService from db();
}
////////Hii function naweza kuiita juu kwenye constructor? /////////
function login($name, $password){
if(/*check password & user Name Hapa*/){
return true;
}else{
return false;
}
}
///////////////////////////////////////////////////////////////////
}
?>[/SIZE]