Jump to content

[SOLVED] if login, dont show login page


chanfuterboy

Recommended Posts

hi,

 

i need help with a php script. When if i'm login. if somehow i go back to login.php i dont wanna see the page because im already login. someone can help me.

 

Here is the script to check if someone is online or not, if not it send you to login page.

 

<?php

session_start();

require_once("connect.php");

if(!isset($_SESSION["username"]))

{

  header('Location: login.php');

  exit;

}

?>

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/169482-solved-if-login-dont-show-login-page/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.