Jump to content

echo in a new page...


Pavlos1316

Recommended Posts

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: member.php");
echo "<p> </p><p> </p><center><font color=#FFFF00><font size=36><font weight=bold>Welcome $Username to our members area.</font></font></font></center>";
exit();

Link to comment
https://forums.phpfreaks.com/topic/108887-echo-in-a-new-page/#findComment-558625
Share on other sites

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: member.php");
echo "<p> </p><p> </p><center><font color=#FFFF00><font size=36><font weight=bold>Welcome $Username to our members area.</font></font></font></center>";
exit();

 

show us the whole code? 

 

 

Link to comment
https://forums.phpfreaks.com/topic/108887-echo-in-a-new-page/#findComment-558628
Share on other sites

ok

change lines

header ("location: member.php");
echo "<p> </p><p> </p><center><font color=#FFFF00><font size=36><font weight=bold>Welcome $Username to our members area.</font></font></font></center>";

to

echo "<p> </p><p> </p><center><font color=#FFFF00><font size=36><font weight=bold>Welcome $Username to our members area.</font></font></font></center>";
include ("member.php");

Link to comment
https://forums.phpfreaks.com/topic/108887-echo-in-a-new-page/#findComment-558653
Share on other sites

You got the id in a session, just query the table with the id and put the message on the next page. Either that or you would need to store the username in the session and put the welcome message on the next page and use the session variable instead of $Username.

 

Ray

Link to comment
https://forums.phpfreaks.com/topic/108887-echo-in-a-new-page/#findComment-558655
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.