PHP

Set php variable value in localstorage & get localstorage value into into a php variable?

Set php variable value in localstorage –

  echo "<script>document.write(localStorage.setItem('auth_Token', '".$auth_Token."'))</script>";

Get localstorage value into into a php variable –

  $phpvariable = "<script>document.write(localStorage.getItem('local_variable'))</script>";

Advertisement

Did you find this helpful? Share it!

Leave a Comment

Your email address will not be published. Required fields are marked