cerberus478 Posted September 6, 2011 Share Posted September 6, 2011 Hi I have a username and password page and when the person enters the details they go to another page or if they are admin they have to go to a diffrent one. Here is my code: if($this->is_admin()){ ?> <ul id="menu"> <li><a href="/admins/home">Home</a></li> <li> <a href="/galleries/galleries">Galleries</a> </li> <li> <a href="/admin/users/logout">Log Out</a> </li> </ul> <?php } ?> <?php echo $this->page('view');?> Link to comment https://forums.phpfreaks.com/topic/246530-something-wrong-with-my-if-statement/ Share on other sites More sharing options...
mjahkoh Posted September 6, 2011 Share Posted September 6, 2011 remove the last "?>" Link to comment https://forums.phpfreaks.com/topic/246530-something-wrong-with-my-if-statement/#findComment-1265901 Share on other sites More sharing options...
Muddy_Funster Posted September 6, 2011 Share Posted September 6, 2011 remove the last "?>" Hi I have a username and password page and when the person enters the details they go to another page or if they are admin they have to go to a diffrent one. Here is my code: if($this->is_admin()){ ?> <ul id="menu"> <li><a href="/admins/home">Home</a></li> <li> <a href="/galleries/galleries">Galleries</a> </li> <li> <a href="/admin/users/logout">Log Out</a> </li> </ul> <?php } ?> <?php echo $this->page('view');?> What's the actual problem?!? Link to comment https://forums.phpfreaks.com/topic/246530-something-wrong-with-my-if-statement/#findComment-1265905 Share on other sites More sharing options...
voip03 Posted September 6, 2011 Share Posted September 6, 2011 Your code should work.If You post the full code then we wll know the problem. Link to comment https://forums.phpfreaks.com/topic/246530-something-wrong-with-my-if-statement/#findComment-1265907 Share on other sites More sharing options...
cerberus478 Posted September 9, 2011 Author Share Posted September 9, 2011 Hi Sorry for the late reply but thank you for helping me I finally got it to work Link to comment https://forums.phpfreaks.com/topic/246530-something-wrong-with-my-if-statement/#findComment-1267238 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.