squiblo Posted July 23, 2009 Share Posted July 23, 2009 if i type into my url "www.squiblo.com/profile.php" it come us with a page and "Login Successfull" but i havent even logged in. The same page comes up when logging in properly which i would expect the script for the profile page is show below. i would like the page to redirect to a different page if not logged in but i do not know where to start. <? session_start(); if(!session_is_registered(myusername)){ header("location:index.php"); } ?> <html> <body> Login Successful </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/167152-solved-profile-page-problem/ Share on other sites More sharing options...
conker87 Posted July 23, 2009 Share Posted July 23, 2009 Don't use session_is_register, just use: <? session_start(); if(!$_SESSION['myusername']){ header("location:index.php"); } ?> <html> <body> Login Successful </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/167152-solved-profile-page-problem/#findComment-881357 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.