Hallo,
Ik heb net de volgende code geschreven in php, maar weet niet of dit kan wat ik nu wil:
Ik wil namelijk dat de rang van de user word getoond.
Ik hoop dat iemand mij kan helpen/verbeteren,
gr. Jos
Ik heb net de volgende code geschreven in php, maar weet niet of dit kan wat ik nu wil:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/class"]class[/URL] userName[COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$rQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT rechten FROM gebruikers WHERE id="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user_id[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$aRechten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$rQuery[/COLOR][COLOR= #007700]))[/COLOR]
[URL="http://www.php.net/public"]public[/URL] [COLOR= #0000BB]$showRechten[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$aRechten[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rechten[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$showRechten[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]Admin[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]Lid[/COLOR][COLOR= #007700];
}
}[/COLOR]
[COLOR= #0000BB]$echoUserName[/COLOR] [COLOR= #007700]= new[/COLOR] userName[COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$echoUserName[/COLOR][COLOR= #007700];[/COLOR]
?> Ik wil namelijk dat de rang van de user word getoond.
Ik hoop dat iemand mij kan helpen/verbeteren,
gr. Jos


