Redirect To Previous Page In Php - Before it does the redirect to. How do i redirect to a previous page using header (location:.) ? Web part of php collective. Web store the login target to the session, before redirecting to the login page. Web <?<strong>php</strong> function redirect ($url, $code = 302) { if (strncmp ('cli', php_sapi, 3) !== 0) { if (headers_sent !== true) { if (strlen (session_id ()) > 0) { // if using sessions session_regenerate_id (true); The order.php page checks if the user is already logged in and calls login.php if necessary.
The order.php page checks if the user is already logged in and calls login.php if necessary. How do i redirect to a previous page using header (location:.) ? Before it does the redirect to. Web <?<strong>php</strong> function redirect ($url, $code = 302) { if (strncmp ('cli', php_sapi, 3) !== 0) { if (headers_sent !== true) { if (strlen (session_id ()) > 0) { // if using sessions session_regenerate_id (true); Web part of php collective. Web store the login target to the session, before redirecting to the login page.