C
C
Carry2015-12-07 15:44:27
PHP
Carry, 2015-12-07 15:44:27

How to store data from JS to PHP for use (Cookies are not suitable)?

I need an analogue of Cookie to store a little more textual information.
I'm getting some data in JS (but it doesn't fit in the scope of the Cookie) and I need to store it somewhere in order for PHP to work with that data.
1. AJAX is not allowed - extra load for the sake of one variable does not make sense

Answer the question

In order to leave comments, you need to log in

4 answer(s)
C
Carry, 2015-12-08
@carryx

changed my code under session, use SESSION for big data - it's better than AJAX

N
Nicholas, 2015-12-07
@healqq

1. AJAX is not allowed - extra load for the sake of one variable does not make sense

We're in 2015, right?

S
shevlyakovn, 2015-12-07
@shevlyakovn

Try localstorage
htmlbook.ru/html5/storage
Also look at your problem from the other side, there are more elegant solutions

A
alex1442, 2015-12-07
@alex1442

can be stored in the session
Difference between livers and sessions:
via: myrusakov.ru/php-cookie-session.html
The question says about getting data on the client side, in order to send them to the server, the request is necessary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question