1

is it possible to retrive the data from local storage using php?

actually i can store form values in local storage by using sysphus, a jquery plugin. if it was possible, can you suggest a piece of code for retrieving the data from local storage using php only?

devsnd
  • 7,382
  • 3
  • 42
  • 50

2 Answers2

3

If by "local storage" you mean the storage in the browser: no, PHP cannot reach into the browser to get data out. PHP receives an HTTP request from the browser, and that's all the information PHP gets from it. It cannot request or get more. Local storage in the browser is only accessible via Javascript.

Somewhat relatedly, see https://stackoverflow.com/a/13840431/476.

Community
  • 1
  • 1
deceze
  • 510,633
  • 85
  • 743
  • 889
0

You need to copy the values from local into a form element with javascript. Then submit a form to get the values to php.

Esben Skov Pedersen
  • 4,437
  • 2
  • 32
  • 46