Questions tagged as 'session'

1
answer

My session is not being destroyed -PHP-

I have the following code on a usury login page: public static function destruirSessao() { if (isset($_SESSION)) { session_start(); unset($_SESSION["codigo"]); unset($_SESSION["nome"]); session_destroy();...
asked by 12.04.2018 / 14:30
1
answer

Doubt when using SESSION to store data

I'm trying to display n names from a list, I'm making use of sessions for this to be possible. When I use the session via form page elements are added n times to the array, however when I use the even by the class is not returned the expected re...
asked by 12.03.2018 / 19:25
2
answers

Adding cart values from a session

How can I print on the screen the total of the products in a shopping cart coming from a PHP session? <?php if(isset($_SESSION['product_cart'])){ foreach($_SESSION['product_cart'] as $data){ ?>...
asked by 06.09.2017 / 19:55
1
answer

login with php session

I would like when I get to the login page only a user with a certain login would enter the error when I access php code: if($_SESSION['login'] == 'admin') { echo "logado"; } It gives error in the part of the session in if, as if it did n...
asked by 14.03.2017 / 17:47
1
answer

how to log off automatically after the session has expired?

I'm having problems, if the user is idle for more than 24 minutes, the page remains the same. If I am on my page and the session is expired due to inactivity (it has passed 24 minutes), I still can interact on the page, but if I want to send the...
asked by 10.06.2016 / 20:19
2
answers

Deleting PHPSESSID

I'm making a cart with $_SESSION and when the purchase is finished, I should clean or delete the PHPSESSID (which is auto-created). But I'm not able to delete or update. I've tried with unset() and session_destroy() a...
asked by 22.01.2018 / 07:10
1
answer

C # Windows Form - Questions about Session

I need to save an information by the time the user is logged in to my software, I searched and saw that for web pages made with ASP.NET there is the object SESSION , but for Windows Form? The information I need and the user name, I have...
asked by 21.07.2016 / 15:15
1
answer

How to save data passed by parameter in the url in a session?

This is the following, I was asked to do this: Make the user to pass in the url the image and the desired color (to change the image and color according to the client), the moment you receive this color and image, I must record in session (sessi...
asked by 19.03.2015 / 14:38
1
answer

Create session variable when logging in - Laravel

Good morning, I'm working on a site made in Laravel, which I did not do. I need to do the following: When the user logs in, I want to get a specific value (column "idLoja") from that user in the database, and create a session variable so that...
asked by 25.02.2016 / 20:08
1
answer

Make $ _SESSION work as session_register

I changed my session_register to $_SESSION , however $_SESSION does not allow me to use the variable in the same way as session_register . For being deprecated I thought they corresponded the same thing. However th...
asked by 13.11.2014 / 13:44