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 Quote 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. Quote 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!! Quote 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; } Quote 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 Quote 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. Quote 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. Quote 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!!! Quote 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; Quote 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. Quote 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 Quote 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..!! Quote 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!!!! Quote Link to comment https://forums.phpfreaks.com/topic/115817-solved-echo/#findComment-596249 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.