This is a discussion on "[SOLVED] PHP Logout Message when redirect" within the PHP Forum section. This forum, and the thread "[SOLVED] PHP Logout Message when redirect are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] PHP Logout Message when redirect
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
[SOLVED] PHP Logout Message when redirect
Hi everyone was womdering i have a logout page and when it logs out it redirects to the index.php but when it redirects to index.php i want it to say "Logged out Successfully.
hope some1 can help. Thanks Aadon Last edited by Aaron1988; Nov 18th, 2007 at 21:43. Reason: corrected spelling and grammer |
|
|
|
#2
|
||||
|
||||
|
Re: PHP Logout Message when redirect
Okay tell the redirect to go to: /?logout
This is a GET query. So where you want the message to appear put the following code:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#3
|
|||
|
|||
|
Re: PHP Logout Message when redirect
ok this is my logout page code
Thanks Aaron |
|
#4
|
||||
|
||||
|
Re: PHP Logout Message when redirect
And this part:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#5
|
|||
|
|||
|
cheers mate
but anyway thanks for your help it works also how can i have it so it says you have "logged out successfully" then it shows there $username? Thanks Aaron |
|
#6
|
||||
|
||||
|
Re: PHP Logout Message when redirect
Well you destroyed the session in the log out script that held the username so you'd have to go to a lot of bother for that.
It's not really worth it.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#7
|
|||
|
|||
|
ok mate,
so just keep it as it is then Cheers Aaron |
|
#8
|
||||
|
||||
|
Re: PHP Logout Message when redirect
Do you know how to do that?
would be something like this at the top of every page you want protected:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#9
|
|||
|
|||
|
Re: PHP Logout Message when redirect
Hey mate thanks for that i did already know how to do that lol, cause had one already that used the checklogin function lol,
Only thing i wanted with the restrict access, was when it restircts say a "You have entered a restricted error <a href="/login/register.php" Thanks Aaron |
|
#10
|
||||
|
||||
|
Re: [SOLVED] PHP Logout Message when redirect
Ahh right:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Last edited by alexgeek; Nov 19th, 2007 at 15:58. |
|
#11
|
|||
|
|||
|
Re: [SOLVED] PHP Logout Message when redirect
mate i know you put this as solved but it not lmao cause when i use the 2nd code you give me i get this error
Fatal error: Call to undefined function: eit() in /home/greatmaste/domains/qwhosting.co.uk/public_html/aboutshop.php on line 5 |
|
#12
|
||||
|
||||
|
Re: [SOLVED] PHP Logout Message when redirect
Sorry typo. it's exit()
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#13
|
|||
|
|||
|
Re: [SOLVED] PHP Logout Message when redirect
ok mate lol, also i dont want the message ti display on a white page lol i want it to be displayed on the index.php page cause then itbe eaiser and will look more professional
Thanks Aaron |
|
#14
|
||||
|
||||
|
Re: [SOLVED] PHP Logout Message when redirect
Oh okay.
Do the same as the first example but change it to redirect to /?login then put this wherever you want the text to appear:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#15
|
|||
|
|||
|
hi i have put this on my page i want protected
|