php - Checking external session variable on each page before loading, with javascript -
i've created php login system saves username session variable, on server php hosted.
i need check session before loading pages within stand alone phonegap (html, css & javascript) project hosted separately.
is there javascript call can make @ start of each page check , redirect if aren't logged in?
you should not that, turn off javascript , bypass check.
instead, normal php check on eatch page. can put check separate file (say, check.php) , put on etach page require ('check.php');
edit (reply comment/question edit):
a) how make own session:
as simple session_start();
b) how pair remote session:
if (!isset($_session['remoteid'])) $_session['remoteid'] = sesion id recived response prom remote php server.
once again, can not html, css & javascript. javascript can turned off. need php/python/ruby/etc... needless add javascript can not persistent, since not executed on server.
Comments
Post a Comment