QUOTE(sam_benne @ 15 Jul, 2008 - 10:55 AM)

Hi on my website I have a login system and it works perfectly however, it is useless as it does nothing you can few every page and do what you want. I am no good at php but my whole site uses it and what I am after is a page a bit like myspace (not that complicated) and if a person logs in when they go on my forum they are allowed to add a topic. like on this website. So if there is anyone that knows of a good site that I can use or can help me please reply. Thank you in advance.
I don't quite understand what you're asking, but I think you want to know how to lock out pages that require a login.
When your script sees that a login is successful, it should set a session variable to true.
php
if (loginSuccessful) {
$_SESSION['loggedIn'] = true;
}
Then on the top of every page you want authenticated, you would include something like
php
if ( ! $_SESSION['loggedIn'] ) {
// Redirect the user if he's not logged in
header("Location: login.php");
}
You could also put that script in a file like authenticate.php and just require() it.
Hope that's what you're looking for.
This post has been edited by akozlik: 15 Jul, 2008 - 09:43 AM