Tuesday 15 March 2011

php - Unset canceling out if statement -


I have set up sessions in one session, when I check that it is set and then the function calls the session variable Without setting, it seems that if if statement is canceled.

Code:

  if (isset $ _SESSION ['Errors'])) {output_errors ($ _ session ['Errors']); Not set ($ _ session ['Errors']); }   

This error should be output and should not be set up again. It seems like if the status is unset before

Update: If unset is removed, then it should work for

output_errors people. function output_errors ($ error) {echo '& lt; Font color = "red"> gt; . $ Error '& lt; / Font & gt; '; Echo & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {var blind = document.getElementById ("blind"); var container = document.getElementById ("login"); blind.style. display = "block"; container.style.display = "Block";}); & Lt; / Script & gt; '; }

donate it, assign each other to this variable and the form of the parameter Use them for the output function:

  if (isset ($ _ session ['Errors'])) {$ errors = $ _SESSION ['Errors']; Output_errors ($ errors); Not set ($ _ session ['Errors']); }    

No comments:

Post a Comment