allow access to a .php file only from another .php file and not direct url
I have two files stored in my local server in a folder, login.php and
update.php. These two files are accessible from any location as long as
they enter:
ip:port/folder/login.php
and
ip:port/folder/update.php.
What I am trying to do is prevent the users going to update.php by
entering it in the url and only allow them to access the update.php file
by first going to login.php (login.php redirects them to update.php when a
button is pressed).
I am kinda new to php and apache. I am not sure if this should be done in
PHP or in .htaccess file and how.
Thanks in advanced!
No comments:
Post a Comment