What can be saved in a session

If a user fills a web form can a section of fields be saved once they submit it, so that they can browse to a different page (and using the same form) they don’t have to fill that section again?

I want to collect their address only once, the first time they send the form.

This would be for a non logged user.

In the multiple submissions received I would need to be able to identify them somehow as the same user.

thanks,

Mostly scalar values. On objects you may get sync errors.

then put in the values your stored in the session.

if the user accepts the session handling this will do it.

hi Chorn,

This can be done for standard guest users? Once they close the browser they would lose the ability to bypass the address section of fields?

My understanding is that being logged in is only necessary so a user can retrieve old entries.

Also what does the user need to accept, is this the cookies popup window?

I’ll get someone to code this but I just need to understand the principles

thanks

Are you aware that even though a session is an array each session variable can store an array?

Also HTML Forms return either $_GET or $_POST variables both of which are arrays so…

What should that mean? People are accesing websites mostly via browser, any login mechanism must be implemented by yourself, so only you can answer that.

Depends on how you implemented this. By closing the window, most browsers will delete any session related data. But that’s not guaranteed. And clients can send you any data they want anytime.

What are “old entries”? What login? You implemented that.

Just look at the manual on how sessions are distributed

https://www.php.net/manual/en/intro.session.php

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.