Answer to Question #6088 in AJAX | JavaScript | HTML | PHP for salah

Question #6088
Hello experts,
i have a login script. i want users to redirect to the previous page from where they came. after successful login. some one suggested me this
$current_page_URL = $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
but i am new to php so i don't know how to pass this through the login form and redirecting to it if the login is successful. please help me. thanks
1
Expert's answer
2012-01-26T10:06:30-0500
if login success use string

header("Location: ".$_SERVER["HTTP_REFERER"]);


https://php.net/manual/en/function.header.php

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS