php - Checking isset on session stops javascript -
php - Checking isset on session stops javascript -
hey checking if existence of $_session variable javascript..
if (<?php echo isset($_session["variable"]); ?>){ //alert ("lol"); }
if exists works fine, otherwise gives java script error. illustration
alert("<?php echo isset($_session["variable"]); ?>");
gives empty alert, doesn't give errors
what missing?
echo
won't output false
getting if()
syntax error. utilize var_export(isset($_session['variable']))
instead, either output true
or false
javascript php session
Comments
Post a Comment