the action of the checkout form is to post to the confirm.php page:
<form name="ecart_checkout_form" action="confirm.php" method="post">
all form processing must occur on the forms action page the action page is where the form data is sent when the form posts.