67 007
Assignments Done
99,2%
Successfully Done
In November 2018

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
Expert's answer
if login success use string

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


http://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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions