How to limit access on my page to unregistered visitors?
Like that they can't open forum or users profiles?

Use sessions, when a user signs in, create a session:

// Put this at the top of the page
session_start();

// Process the login then do this:
$_SESSION['logged_in'] = 1;

Then only allow access to the page to users who have an active session:

if(isset($_SESSION['logged_in'])) {
  // Continue with the page code
} else {
  echo "Please log in";
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.