That's because you have two different forms in your first page. Only the one that is being sent off to the next page will be working. Try make one form. Looking at the code, it looks like one big mess. You should either start learning PHP properly and not skip ahead of yourself, do it step by step, because I'm not really sure if you actually understand what you are coding here.