PDA

View Full Version : Help needed


C.Birch
06-03-2002, 03:58 PM
Right im trying to make a password gate to a members only page on my site useing the vb members data base and that.

Im usering the following code


<?php

include("global.php");
if (!$bbuserinfo[userid]) {
eval("dooutput(\"".gettemplate("membersnoreg")."\");");
} else {
eval("dooutput(\"".gettemplate("membersmain")."\");");
}

?>

thing is that will let all members in i want to make it so only a few member groups can go in anyone know how i can do this?

Admin
06-03-2002, 04:13 PM
<?php
error_reporting(E_ALL & ~E_NOTICE);
require('./global.php');

if ($bbuserinfo['usergroupid'] != 6) {
eval("dooutput(\"".gettemplate("membersnoreg")."\");");
} else {
eval("dooutput(\"".gettemplate("membersmain")."\");");
}

?>
It will let only users from usergroup 6 in.

C.Birch
06-03-2002, 04:16 PM
thanx alot what do i have to do if i want more then just one user group in?

Admin
06-03-2002, 04:20 PM
And or to the if statement.

C.Birch
06-03-2002, 04:35 PM
sorry for bugging but just how would you add it to the code im new to php

Admin
06-03-2002, 04:37 PM
if ($bbuserinfo['usergroupid'] != 6 and $bbuserinfo['usergroupid'] != 5 and $bbuserinfo['usergroupid'] != 2) {

C.Birch
06-03-2002, 04:45 PM
thanx alot :D your a star

Admin
06-03-2002, 04:51 PM
You're welcome. :)