Different problem moved to different thread for the benefit of other users.
if(($_POST['submitted'])){
You changed this (correctly) to [font=monospace]if(isset($_POST['submitted'])){[/font] but you've reverted it back.
If you have two submit buttons, you can distinguish which one was clicked by looking at the submitted value. Or naming them differently and seeing which one appears in the [font=monospace]$_POST[/font] array (at the moment you don't name them at all). Then the two hidden fields following them aren't needed.
Also, you might want to check the HTML source you're generating: there seem to be some mismatched tags and other validation errors in there.