How to redirect back to the previous page in PHP?
<p>I have a PHP site which have a login page.
I have also an order.php page. When the user is not login then the order page redirect the user to the login page first.
I want when the user redirect from the order page to the login page then on successfully login the user should redirect back to the order page.
And When the user comes from other pages to the login page then on successfully login the user should redirect to the index.php page.
How will I do this? Any Idea?</p>
