View Single Post
  #4 (permalink)  
Old May 10th, 2007, 19:31
Donny Bahama Donny Bahama is offline
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 236
Thanks: 4
Thanked 0 Times in 0 Posts
Re: Login Script problems

In other words, you need to be more careful about enclosing your blocks of code within the correct if...elseif...else structure.
Code: Select all
if (420 > 1) {
    // code here will definitely be executed
} elseif (365 > 1) {
    /* although 365 IS > 1, this won't be executed 
    because the 420 > 1 branch evaluated true */
}
// code here will be excuted regardless of whether 420 or 365 >1
// so will this because it's actually outside the if structure
else {
    // this code won't ever be executed because 420 > 1.
}
// endif is very old code and not needed if you use curly braces to enclose if structure.
Reply With Quote