the answer is not in the code that you've presented. Most likely your 'ShowAll' function does the same thing as your submitlogin.php. maybe both just display the values? if you show the code for that file, and that function, you'd probably get a better answer.