Jump to content

[SOLVED] login.php


Pavlos1316

Recommended Posts

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

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.