Questions tagged as 'sesiones'

3
answers

cookies vs sessions [closed]

I am working on the development of a website and the time has come to start working with cookies. Currently, I use sessions to register users, but I wonder: What are the differences between sessions and cookies? What are its advantag...
asked by 04.06.2017 / 15:21
1
answer

undefined index php

I have this code, the fact is that in the line of $ _SESSION ['students'] I miss the error. What I want is that if that array of students does not exist that believes it, and when the program starts, since it does not exist, it gives me that err...
asked by 17.01.2018 / 11:17
1
answer

How to keep data in my session during all requests in Laravel 5.1?

Greetings, what I need is to keep some data sent from a form in an array that I store in Session de laravel, I'm doing it in the following way: In the routes.php I have: Route::bind('evento', function($slug){ return Deportes\Even...
asked by 07.07.2017 / 13:27
1
answer

Show image from stored route with PHP

You see, I have occupied the following function to be able to obtain the data of my current session: public function login(){ $username = $this->input->post("username"); $password = $this->input->post("password");...
asked by 18.12.2017 / 11:53
0
answers

Problem with session_start () in php.

I am having a problem that is driving me crazy and I can not see the fault. The good thing is that I managed to reproduce the fault in a very simple situation. Let's see, I have two php files. The first, index.php is like this: <?php ses...
asked by 09.11.2018 / 23:50
1
answer

Session php for book cart

Good morning. I am programming a book cart from a database of books using php sessions. There is very little left for it to work but I'm stuck because the cart does not pick up the added books. I do not put the complete forms only the shipments...
asked by 29.06.2018 / 06:16
2
answers

Cron eliminates user sessions

Scenario: I'm working on a Xampp / Ubuntu Server web server, I needed a routine to run at least 2 times in a minute (30 seconds approximately). To achieve this, raise a cron as follows: * * * * * /opt/lampp/htdocs/control/cronos/cron.s...
asked by 27.09.2017 / 20:08
3
answers

alternatives to SESSION and COOKIE?

While it's true that between cookies and sessions there are similarities and differences, is there an alternative to these two options? On the one hand, the information in cookies can be modified by the user, so storing, for example, a...
asked by 11.12.2017 / 22:46
2
answers

Datediff gives me a Boolean value when comparing two dates

I have a login.php in which a user is valid, and if it is the correct one, I open the session. The code is as follows: if (password_verify($pass,$resultado)) { session_start(); $_SESSION['nic...
asked by 09.07.2017 / 10:03
1
answer

Alternative to session_destroy (), without deleting variables

I'm working with php sessions, and I have a quick question to answer, but I'm not clear on the official PHP documentation. What I want to do is that after starting a session (session_start ()), I close it, but without destroying the variable...
asked by 05.01.2019 / 14:47