Pavlos1316 Posted July 21, 2008 Share Posted July 21, 2008 My code below is the procces php for login. When login fails I get the invalid login msg but it refresh the hole page showing main.html section only. How do I target it in my www.mypage.com with my msg being displayed? db info; db connection; if(mysql_num_rows($result)>0){ //Login Successful //Regenerate session ID to //prevent session fixation attacks session_regenerate_id(); $member=mysql_fetch_assoc($result); $_SESSION['SESS_ID']=$member['ID']; //Write session to disc session_write_close(); header ("location: members_area.php"); exit(); }else{ include 'main.html'; echo "<p> </p><center><font color=#FF0000><font size=5><font weight=bold><p>Invalid Login!</font></font></font></center>"; } Link to comment https://forums.phpfreaks.com/topic/115799-solved-loginphp/ Share on other sites More sharing options...
waynew Posted July 21, 2008 Share Posted July 21, 2008 Why not just bring it to a session protected page? Link to comment https://forums.phpfreaks.com/topic/115799-solved-loginphp/#findComment-595293 Share on other sites More sharing options...
Pavlos1316 Posted July 21, 2008 Author Share Posted July 21, 2008 what do you mean by session protected page? Link to comment https://forums.phpfreaks.com/topic/115799-solved-loginphp/#findComment-595297 Share on other sites More sharing options...
Pavlos1316 Posted July 21, 2008 Author Share Posted July 21, 2008 ok.. I just had to target my login form. Thanks. Link to comment https://forums.phpfreaks.com/topic/115799-solved-loginphp/#findComment-595301 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.