Re: Redirect direct calls to a script?



Daniel wrote:
On Sun, 10 May 2009 00:36:17 +0200, "Samuel van Laere"
<info@xxxxxxxxxxx> wrote:

I'm not sure if this a PHP or .htaccess job.
But how can I prevent direct calls with or without parameters?
Well perhaps I can't prevent them, but how could I print a error
or redirect to some other page if someone would call a page directly?

thanks in advance.
Samuel


what do you mean "parameters" - if it is about the fact that some
required parameters are missing from the url, then retrieve the values
with $_REQUEST['param_name'] etc, then do some validation and if does
not click, do whatever it takes - either show some error or redirect;

it is a php stuff.

Daniel

$_REQUEST is not a good thing to use. You never know where the value is coming from. If the form is posted, you should use $_POST. If it's a get request, you should use $_GET.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages