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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.