|
| Array problem Fra : Ukendt |
Dato : 16-01-05 18:48 |
|
Hej
Jeg har et lille problem med at få overføt et array fra en lokal variabel
til en global.
flg fungerer ikke:
class test{
$mesg;
Function Set_All(){
$dataarray = $this->userinfo;
if ($dataarray['email_address']!=""){
if ($this->Email_Exists($dataarray['email_address'])){
$ERR_MSG[] = "Email address is already used by another user,
please specify another </ BR>";
}else if (!$this->email_Validate($dataarray['email_address'])){
$ERR_MSG[] = "Email address not valid. Please enter a valid
emailaddress </ BR>";
}else{
$updatequery.= "email_address = '".$dataarray['email_address']."',
";
};
}
if ($dataarray['password1']!=""){
if (!($dataarray['password1'] == $dataarray['password2'])){
$ERR_MSG[] = "passwords not identical, please retype passwords </
BR>";
} else{
$updatequery.= "password = '".md5($dataarray['password1'])."', ";
};
};
if (!$this->phone_Validate($dataarray['phone'])){
$ERR_MSG[] = "not a valid phonenumber:".$dataarray['phone']."</ BR>";
}
if (!$this->phone_Validate($dataarray['mob_phone'])){
$ERR_MSG[] = "not a valid mobilephonenumber:".$dataarray['mob_phone']."</
BR>";
}
if ( count($ERR_MSG)!= 0 ){
$this->mesg = $ERR_MSG;
return FALSE;
}
}
den får simpelthen ikke smidt værdierne over i $this->mesg
nogen der kan forklare mig hvorfor?
Bær venligst over med manglende paranterser, semikoloner osv.
mvh
Regin Madsen
| |
Mads Jensen (17-01-2005)
| Kommentar Fra : Mads Jensen |
Dato : 17-01-05 11:57 |
|
Regin Madsen wrote:
> class test{
> $mesg;
Jeg tror, at det skal være: var $mesg;
/Mads
--
Mads Jensen - remove z's in email
If the code and the comments disagree, then both
are probably wrong. -- Norm Schryer
| |
Ukendt (18-01-2005)
| Kommentar Fra : Ukendt |
Dato : 18-01-05 17:05 |
|
> Jeg tror, at det skal være: var $mesg;
>
> /Mads
> --
> Mads Jensen - remove z's in email
>
> If the code and the comments disagree, then both
> are probably wrong. -- Norm Schryer
Det hjalp ihvertfald lidt
/Regin Madsen
| |
|
|