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> 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> Link to comment https://forums.phpfreaks.com/topic/167152-solved-profile-page-problem/#findComment-881357 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.