Jump to content
MakeWebGames

A function...


CJ - Twitch

Recommended Posts

if (!empty($error_msg)) {
  header('Location: /error_page.php?msg=1');
}

in your footer or something?

 

<?php

$error_msg = array(
	1 => 'error one', 
	2 => 'error two'
);
	$_GET['msg'] = (isset($_GET['msg']) && array_key_exists($_GET['msg'], $error_msg)) ? $_GET['msg'] : 1 ;
  echo '
<h1>Error!</h1>
'.$error_msg[$_GET['msg']];
?>

in error_msg.php

Link to comment
Share on other sites

Just add this into .htaccess.

 

ErrorDocument 404 /ErrorPage.html

 

I don't fully understand what you want as your post doesn't make sence but If I'm thinking along the right lines it'll work, any time a user goes to a that file that doesnt exist it will re-direct them...

Link to comment
Share on other sites

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.   Paste as plain text instead

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