<?php
$connection = mysql_connect("localhost", "root", "");
$db = mysql_select_db("tumy", $connection);
session_start();
$user_check=$_SESSION['username'];
$ses_sql=mysql_query("select username from customer where username='$user_check'", $connection);
$row = mysql_fetch_assoc($ses_sql);
$login_session =$row['username'];
//if(!isset($_SESSION['username'])){
//header('Location: homepage.php');
//}
?>
May I know is there need to set any condition when public visiting my website?
Because it shows
undefined index: username in $user_check.
When the header Location: homepage.php, it direct come out with blank page.
So may I know the solution for it?