LOL KingTomato..nothing wrong with getting help. I haven't had time to do the re-write yet, so I was pleasantly surprised to see that someone had already taken the initiative.
A couple of things that I noted in your code, which could be improved.
1) Regarding multiple statements that are remarked. You can group these by putting /* on the line before the remarks start and */ on the line after they end. These eliminate the need for ; at the start of each line
2) You use if/else if/else in locations, when the proper form is if/elseif/else. Note the missing space in the elseif portion. Yours will work, but the other is proper format.
3) Your $isnumeric alias & regex can be eliminated by using isnum as all of the items that you're checking (as far as I could tell) fall under the isnum category. I can understand why you might think some might not, specifically the operations characters, but they do.
4) For security purposes, regarding the password, I would've used $md5 when storing the password, then compared the $md5 value of the entered password with the stored value (which is in $md5 format). This eliminates the need for $decode to be unlocked and is more secure.