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

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -