I am new to php and I would like to know how to create a single page that only logged in users can access. As in, one page will have submit buttons on it, but you can only click those buttons if you register on the site. Where do I install log in scripts, and what will I need to download other than sql?
create login and securepage ( Logged Members page)
At secure page, after db connection. check the user is logged in and process the page based on the result
/* securepage.php */
// suppose you have a logged in user_id in session as $_SESSION['logged_user_id'];
/-- Codes for the page --/
You should be aware of the various security issues surrounding login pages. Perhaps it would be easier to use a library? Give this one a try. It looks interesting. http://php-login-script.com/
Originally Posted by dukesdemise
What is a library? The link you posted seemed like a normal sql login script tutorial, is a library something you don't need a login for?
Hmm. Ok I'll give you a direct download link to the LIBRARY on the same site. Had you scrolled down a little bit further you would have seen it.
A library is a set of classes and functions that you can incorporate into your application. In this case its a library implementing a login. You'll just have to work it into your application if you wish to use it.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)