$pro = $user_data['username']; if ($pro != "drama", "another name", "another one") { die ('You are not allowed to use this page'); }if i make only one name it works normal but if i make to many names i get page error any thing to fix this ?

$pro = $user_data['username']; if ($pro != "drama", "another name", "another one") { die ('You are not allowed to use this page'); }if i make only one name it works normal but if i make to many names i get page error any thing to fix this ?
$pro = "drama"; $accepted = array( 'First'=> 'drama', 'Second' => 'another name', 'Third' => 'another one' ); if (in_array($pro, $accepted) === false) { die ('You are not allowed to use this page'); }
if (in_array($pro, array("drama", "another name", "another one")) == false){ // redirect ? }I use that all the time
drama22 wrote:WOW Thankkkkkkks ,,, this is the best forum ever , Thanks for your help guy's![]()
![]()
![]()