Why doesn’t my submit button redirect to a new page (using PHP) [duplicate]

This question already has an answer here:

I am trying to make my page redirect to $PaymentPage when the Confirm button is clicked. For some reason when I click it nothing happens at all.

I have made the form method post, and I have checked that if submitted, direct to $PaymentPage.

       <form method="post"></form> 
        
Confirm
</form> <?php if ( isset( $_POST['submit'] ) ) { header("Location: $PaymentPage", false); } ?>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s