mercredi 29 avril 2015

javaScript to check if session exist

<script>
  $(document).ready(function() {
    session_start();
    if (!$_SESSION['kool']) {
      alert("session")
    } else {
      alert('work')
      location.href = 'lol.html';
    }

  });
</script>

it doesn't work why ?

Aucun commentaire:

Enregistrer un commentaire