Jump to content

Need help with come code


evanscnce

Recommended Posts

you have the default so i dont get this

I want a default to load by default (unless another link is chosen)

 

but for your pop up have this

 

<?php
$pages = array("edit.html","delete.html","home.php");
if(in_array($_GET['page'],$pages)){
include($_GET['page']);
}
else{
echo '<cript type ="jascript">
alert ("mali page not found");
         </script>';



include("default.html");
}
?>

 

there might be an error as you can see im not good in typing

 

I have this:

<?php
$pages = array("main","test","weewoo");
if(in_array($_GET['page'],$pages)){
include($_GET['page']);
}
else{
include("error.html");
}
?>

 

Problem is, when it loads index.php the first time error.html comes up. I want it to show main.html and only show error.html if something goes wrong.

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.