Hallo,
ich arbeite gerade an einem tutorial, eine funktion hat ein " return $rights;" ganz am Ende- ich nehme an es liefert das array?
function getrights () {
if (isset($UID)) {
$sql = "SELECT
Rechte
FROM
user_rights
WHERE
ID = '".$UID."';"
;
} else {
$sql = "SELECT
Rechte
FROM
user_rights
WHERE
ID = '".$_SESSION[ID]."';"
;
}
$results = mysql_query($sql) OR die(mysql_error());
$rights = array();
while($row = mysql_fetch_assoc($results)){
$rights[] = $row['Recht']
}
return $rights;
}
thx,
leo