dean7 Posted May 24, 2009 Share Posted May 24, 2009 Hi all, on my website ive got permissions eg Mod - Head Mod - Admin etc.. But i want them to all be able to acces the Mod cp: <?php ob_start();// adds cookies include("config.php"); if(isset($logged['username']) && ($logged['level'] == Owner || $logged['level'] == Co-Owner || $logged['level'] == Admin || $logged['level'] == Head Mod || $logged['level'] == Mod)){ // Line 30. echo "Welcome Mod!"; }else{ header( 'location:http://**************.com/main.php' ); But i get a error: Parse error: syntax error, unexpected T_STRING in /home/a6651052/public_html/mod.php on line 30 Anyone know why? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/159509-solved-unexpected-t_string/ Share on other sites More sharing options...
wildteen88 Posted May 24, 2009 Share Posted May 24, 2009 The words Owner, Co-Owner, Admin, Head Mod and Mod need to be wrapped in quotes. Quote Link to comment https://forums.phpfreaks.com/topic/159509-solved-unexpected-t_string/#findComment-841380 Share on other sites More sharing options...
dean7 Posted May 24, 2009 Author Share Posted May 24, 2009 How would you rap them in quotes? Or is that were you would do somthing like $logged['level'] == (Owner) || Quote Link to comment https://forums.phpfreaks.com/topic/159509-solved-unexpected-t_string/#findComment-841385 Share on other sites More sharing options...
thebadbad Posted May 24, 2009 Share Posted May 24, 2009 Strings must be wrapped in quotes: 'Owner', not Owner Just like you've wrapped your other strings in quotes ("config.php", "Welcome Mod!", 'location:http://**************.com/main.php', etc.) Quote Link to comment https://forums.phpfreaks.com/topic/159509-solved-unexpected-t_string/#findComment-841388 Share on other sites More sharing options...
dean7 Posted May 24, 2009 Author Share Posted May 24, 2009 Sorted now thanks Quote Link to comment https://forums.phpfreaks.com/topic/159509-solved-unexpected-t_string/#findComment-841390 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.