Pascal Parent
Pascal Parent

Reputation: 16

SESSION variables doesn't work on mobile when it's not at local network

I set up a little social network with session variables and I have done a port redirection with my router in my house, but it seams that it has a problem when I try to make SESSION variables, only when I am on my Ipad (whether chrome or safari) and when I'm on the WAN.

What should I do to enable SESSION in mobile?

PS: It works on my computer all the time.

WAN Page 1

WAN Page 2

LOCAL Page 1

LOCAL Page 2

Page 1

<?php //Page 1 session_start(); echo var_dump($_SESSION); ?> 2

Page 2

<?php //Page2 session_start(); $_SESSION['id']=0; echo var_dump($_SESSION); ?> 1

Upvotes: 0

Views: 409

Answers (1)

Sunil R
Sunil R

Reputation: 1

When in mobile you can user Javascript session instead

sessionStorage.setItem('session_variable',session_value);

Upvotes: -1

Related Questions