References
External links
Category:Villages in Malaysia
Category:Towns in PerakQ:
How to use php include?
I am trying to implement a system where my admins can have access to pages without having to login or have a user logged in. I can do this with a login script which works fine. The problem I am facing is that when the admin is logged in, any pages which they are able to access (and which are protected with a password) cannot be used.
One of the functions of my admin page is the ability to load pages from a folder called vars. The file is structured like this:
id
userid
name
age
status
...
There are dozens of files. There is a variable in each one which is the id. This is used to relate the vars.php file to the file containing the text for that user. It is the vars.php which is loaded into a separate admin page and then the text is loaded into the separate admin page.
So, it looks like this:
Hello there, admin!
At the minute this works fine. When the admin logs in the above PHP is run, the vars file is loaded, the id of the current user is retrieved and the text is loaded from the relevant vars.php file. If I were to use a login script to control access to a separate page, then the text would be loaded only when the user is logged in.
So I was wondering how I can get the admin logged in PHP to recognise that the user is logged in? I have done some reading and am currently on the following page:
However, I am not sure what I should use in my code to tell php to treat the user as logged in. So far my code looks like this: ac619d1d87
Related links:
コメント