Is it possible to have a form page for logged-out users where values are stored persistently in WordPress?

I don´t know if this sounds a bit weird but I´m looking for a way to give unregistered users a form on which they can choose different options and depending on these values there should be content variations on other pages. And to make it one step more difficult: These values should be stored persistently beetween sessions?

This could surely be achieved when you put additional custom fields on users profile pages, but I´m looking for a way (or at first an answer of the question if this is possible at all – because when this won´t work I don´t need to think about it any more ;-)).

Read More

My first thought was to submit the form to a database and then the content variations should be shown dependig on a query with WHERE statement. But how should the database should know which entry belongs to which user? Would this be possible, if there is one unique value to identify the user? But that all sounds a bit strange.

Instead I thought about saving the chosen values in browsers local storage. But I don´t know if they can be used to query content in a database.

Or do I think in a totally false way and is there any other way to reach this goal (if it is possible at all)?

Maybe I should give a real example so you could image what I want to achieve: Think about a form on which the users can choose their country and then on one corner of the other pages their flag should be shown. Or they choose their favourite sports and then their will be different content for tennis, football etc.

Related posts

Leave a Reply

1 comment