The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once

× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some of my site's pages need folks to be logged in.
When people click on a page that requires login, I have it redirect to the Login page, so that they can login.
After they login, it takes them back to index.php, and not to the page they clicked on originally.

Is there an argument I can provide to the page they want to login to, that will carry to the login page, that will eventually redirect to the original page?

Here's an example:

I'm at index.php
I decide to click on Books, which should take me to books.php
Because I'm not logged in, books.php redirects me to login.php
After I login at login.php, by default it takes me back to index.php, but not books.php, which is the page I originally clicked on to take me to books.php

I'm thinking there could be a way for any page that redirects to login.php to detect where it came from, and after successful login, redirects back to that page.

So, I'm at index.php, I click on books.php and I end up at login.php because I'm not logged in. login.php knows that I came from books.php and so after I login, I am redirected back to books.php

Is there such a thing?

Forum Jump:

Users browsing this thread: 1 Guest(s)