Jump to content

Something wrong with my if statement


cerberus478

Recommended Posts

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

remove the last "?>"

:wtf:

 

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?!?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.