Page redirect help !

Started on the old forum in April 2011 · view the original in the archive · old links redirect here

3 replies · 430 views · started 15 years ago · 1 min read

3 participants
tamucq Junior · 13 posts #1

Hello guys, cn anyone share me a redirect sc that can be used for redirecting user back to login page if they have wrong username and password pls ?

I've tried used header(); Error show, cannot modify header already send by output 🙁

Added after 3 minutes:

Also have tried this code that i found from other sites 'location.replace()' but useless 🙁

ALL PROFESIONAL START FROM A NOOB !

something else Fellow · 2,296 posts #2

you have to use the header before any other headers eg: At top of page:

if(not_logged_in){
header('Location: login.php');
exit;
}
tamucq Junior · 13 posts #4

something else wrote: you have to use the header before any other headers eg: At top of page:

if(not_logged_in){
header('Location: login.php');
exit;
}

tq bro the code work fine on ma lava sc 🙂

ALL PROFESIONAL START FROM A NOOB !

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close