Pavlos1316 Posted July 21, 2008 Share Posted July 21, 2008 hi When members login my webpage How can I echo the Welcome msg so when they refresh they will not see it anymore? I am trying with echo as I know it and working in all other sections but when a member logs in it is not showned! Thank you Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/ Share on other sites More sharing options...
samshel Posted July 21, 2008 Share Posted July 21, 2008 some code would help. Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-595392 Share on other sites More sharing options...
Pavlos1316 Posted July 22, 2008 Author Share Posted July 22, 2008 Thanks a lot If I knew how to do it I wouldn't have post here!! Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596192 Share on other sites More sharing options...
.josh Posted July 22, 2008 Share Posted July 22, 2008 if (!$_SESSION['firsttime']) { echo "msg here"; $_SESSION['firsttime'] = true; } Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596209 Share on other sites More sharing options...
Pavlos1316 Posted July 22, 2008 Author Share Posted July 22, 2008 ok I will Try this but I write it in my login.php that process login or in the memberspage Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596215 Share on other sites More sharing options...
mmarif4u Posted July 22, 2008 Share Posted July 22, 2008 I think you have write in the page where you show the welcome screen to user. Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596217 Share on other sites More sharing options...
Pavlos1316 Posted July 22, 2008 Author Share Posted July 22, 2008 Yes that's right. I just did it. Thanks a lot. Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596227 Share on other sites More sharing options...
Pavlos1316 Posted July 22, 2008 Author Share Posted July 22, 2008 Something else is wrong... After displaying welcome msg for first time when i refreshed the page, it's gone... ok till here. That is what I wanted. But after when ever some one is loging in, the msg does not displayed for some reason!!! Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596235 Share on other sites More sharing options...
samshel Posted July 22, 2008 Share Posted July 22, 2008 you will have to reset the session to false once the user logs out.. //in logout page $_SESSION['firsttime'] = false; Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596236 Share on other sites More sharing options...
mmarif4u Posted July 22, 2008 Share Posted July 22, 2008 Because i think the first_name is still in the session.did you destroy session by logging out. Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596238 Share on other sites More sharing options...
Pavlos1316 Posted July 22, 2008 Author Share Posted July 22, 2008 Ok.. I had an error in my logout.php Forgot to destroy sessions Thank you Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596241 Share on other sites More sharing options...
Pavlos1316 Posted July 22, 2008 Author Share Posted July 22, 2008 oh this is still giving me problems.... is working when I log out and i am directed to mysite.com/logout.php but when i type mysite.com and try to log in the msg doesn't displayed..!! Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596248 Share on other sites More sharing options...
Pavlos1316 Posted July 22, 2008 Author Share Posted July 22, 2008 Agian SOLVED... Hope this is the last time!!!! Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596249 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.