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
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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.