Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Is it frowned upon/ a bad idea to store information temporarily in a session variable to give access to that information globally?
I have a file upload parser script that is called by ajax on submit of a form and I need to send back data at different parts of the script. I figured saving the information I need in different session variables might be a good idea.
In your case you can store temporary data ( not critical data which compromises with the security ) as a session cookie in the clients' browser.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have an admin page where some users can have access to but I want that whenever they leave the site or close the tab for about an hour or a day the session should be destroyed so as not to allow someone else.
The thing you are searching for is $_COOKIE. There you can define how long the Variable is saved etc. The only thing you will have to consider is that the values are stored locally and not on the server. If you want to achieve that, you can create a Cookie-Key system similar to the one PHP uses to save the Session data on the Server. In that Case the User would get a key, saved as a cookie and the data is stored on the server under that key.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is it possible for someone (hacker), to somehow get a hold of the value of a session variable that is active.
In the normal course of events, the only information about a session available to the client is the session ID.
For data stored on the server (even if it connected to the session ID) to be visible to the client then you need either:
To expose it explicitly
To have a security vulnerability
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have a some forms that stores data in my page.
I want to find a way to temporarily save the data entered by the user in navigating and keep until the order is confirmed.
Can anyone help me?
This is exactly what sessions are for
While I was working on e-commerce sites we used to keep all the order data
in sessions until user confirms order by going to payment gateway.
You can use PHP Session as arrays and store your data temporary and then destroy the session.
$_SESSION['cart'][] = //you data here
Sessions and cookies are used for this purpose but sessions are more secure and reliable.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have a some forms that stores data in my page.
I want to find a way to temporarily save the data entered by the user in navigating and keep until the order is confirmed.
Can anyone help me?
This is exactly what sessions are for
While I was working on e-commerce sites we used to keep all the order data
in sessions until user confirms order by going to payment gateway.
You can use PHP Session as arrays and store your data temporary and then destroy the session.
$_SESSION['cart'][] = //you data here
Sessions and cookies are used for this purpose but sessions are more secure and reliable.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have a some forms that stores data in my page.
I want to find a way to temporarily save the data entered by the user in navigating and keep until the order is confirmed.
Can anyone help me?
This is exactly what sessions are for
While I was working on e-commerce sites we used to keep all the order data
in sessions until user confirms order by going to payment gateway.
You can use PHP Session as arrays and store your data temporary and then destroy the session.
$_SESSION['cart'][] = //you data here
Sessions and cookies are used for this purpose but sessions are more secure and reliable.