-1

So, we have a page that saves variables, one of those variables is an username and password you have to place to access the page.

We have tried everything to destroy that session so the user needs to place the username and password again, but we didn't find a way, so we thought if there was any way that the page was refreshed when pressed a Logout button it would do the same as destroying the session.

What I mean my refreshing? Re-entering the page and losing every saved variable or session, as if it was the first time entering the page.

Edit: So the question is: Is there any "Destroy all" thing in PHP?

Erik
  • 1
  • 2
  • Are you talking about HTTP Basic Auth? – Chris Haas May 30 '22 at 12:35
  • @ChrisHaas Yes, its HTTP, We use a lot of variables like : $_SERVER['PHP_AUTH_USER'], $_SESSION, and many more. I just want to know if theres any way of doing a refresh that works as if you just entered the page for the first time. – Erik May 30 '22 at 12:46
  • `PHP_AUTH_USER` is HTTP Basic Auth and is a [protocol design limitation](https://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html#sec15.6) that is [notoriously hard to resolve](https://stackoverflow.com/q/233507/231316) – Chris Haas May 30 '22 at 12:48
  • @ChrisHaas Thanks for the info! it was rly usefull. – Erik May 31 '22 at 08:48

0 Answers0