Hi ,
How can i force one PHP Page to open(start) only when we came from another PHP ?
Like :
(Page 1)-Acess first (Redirect to page2) |---------(Page 2)(If came from page 1 Ok) / (If not came from page 1 or try to load this first then ERROR).
Can someone help ?
Thanks .
Carlos.
If you're running Apache, you can check the referring url with the predefined variable $HTTP_REFERER.
So:
if ($HTTP_REFERER != 'other_php_page') die("error!");