Could you elaborate on your question - where is the page you want to block being served from - is it a page within a PHP app ? - do you want to block everyone from seeing it or allow a restricted level of access ?
Could you elaborate on your question - where is the page you want to block being served from - is it a page within a PHP app ? - do you want to block everyone from seeing it or allow a restricted level of access ?
Purple
Hi Purple,
I need to allow a restricted level of access. Actually I am totally new to PHP and website development. I didnt get what you mean by a page within a PHP app.
You have a couple of options. If you need to block a page for certain IP addresses or domains, you should have a look at setting up .htaccess files.
On the other hand, if you want to create a 'members-only' section on your website, you'll want to learn more about creating a PHP login script. The linked article is a little complicated at first glance, but if you take it slow, it should help you get started.
i have a working login script, it uses a session varaible. Basically put, you make a login page that sets a session varaible. Then you just throw this schnazzy little code in the top of your private pages that retreives the session varaible, determines if it it valid, and if it is it will display the page, if it is not valid, it will redirect the browser to a error page, or a login page, or a what the heck are you trying to do page. It is entirely customizeable, and it is really great. It saves the fact that the user is logged in untill the user goes to the logout page, or unless the user closes his/her browser. If you want the script, PM me.
i have a working login script, it uses a session varaible. Basically put, you make a login page that sets a session varaible. Then you just throw this schnazzy little code in the top of your private pages that retreives the session varaible, determines if it it valid, and if it is it will display the page, if it is not valid, it will redirect the browser to a error page, or a login page, or a what the heck are you trying to do page. It is entirely customizeable, and it is really great. It saves the fact that the user is logged in untill the user goes to the logout page, or unless the user closes his/her browser. If you want the script, PM me.
Hi,
Thanks. I need the script. How can I PM you? What is your mail id?
You have a couple of options. If you need to block a page for certain IP addresses or domains, you should have a look at setting up .htaccess files.
On the other hand, if you want to create a 'members-only' section on your website, you'll want to learn more about creating a PHP login script. The linked article is a little complicated at first glance, but if you take it slow, it should help you get started.
Hi pbmods,
Thanks. I will go through the sites mentioned by you.
Comment