The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
redirect - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.4 (https://userspice.com/forums/forumdisplay.php?fid=27)
+--- Thread: redirect (/showthread.php?tid=1473)



redirect - Malatesa - 05-07-2019

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?