hEiti Posted April 8, 2007 Report Share Posted April 8, 2007 function checkUser(){ if ((!isset($_SESSION['validUser'])) || ($_SESSION['validUser'] != true)){ header('Location: index.php'); } seit ir funkcijas gabals ja lietotajs nav ielogojies tad vinsh tiek parmasts uz index.php, bet sakiet ludzu ka lai panaku kad tad kad parmet uz index.php reize atver popup? vai ar itas jadara index.php faila? Link to comment Share on other sites More sharing options...
andrisp Posted April 8, 2007 Report Share Posted April 8, 2007 Jā. Link to comment Share on other sites More sharing options...
Stopp Posted April 8, 2007 Report Share Posted April 8, 2007 1) dafiga iekavu par daudz. 2) viens variants: function checkUser(){ if (!isset($_SESSION['validUser']) || $_SESSION['validUser'] != true){ $_SESSION['vajagpopup']=true; header('Location: index.php'); } } un iekš index.php if ($_SESSION['vajagpopup']) { echo "<script>window.open('popaps');</script>"; unset($_SESSION['vajagpopup']; } Link to comment Share on other sites More sharing options...
Recommended Posts