mardi 28 juillet 2015

If else if statement doesnt work with get

Hey guys Im having problem with if else if with $_GET. Im trying to include page based on GET on page. Navigation code

<a href="index.php?page=setting">Setting</a>
<a href="index.php?page=post">Post Article</a>

Php Code

<? 
if($_GET['page']=='post' && $_SESSION['status'] > 0 || $_GET['page']=='setting' && $_SESSION['status'] > 0)
{
include "page/post.php";

}else if{

include "page/setting.php";

}else{
include "page/home.php";
?>

How do I fix this?

Aucun commentaire:

Enregistrer un commentaire