# PHP form with confirmation page

**URL:** <https://forum.kirupa.com/t/php-form-with-confirmation-page/244758>\
**Category:** programming\
**Created:** [November 21, 2007, 2:31pm UTC](https://forum.kirupa.com/t/php-form-with-confirmation-page/244758 "2007-11-21T14:31:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtm4130](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@dtm4130](https://forum.kirupa.com/u/dtm4130)\
**Post date:** [November 21, 2007, 2:31pm UTC](https://forum.kirupa.com/t/php-form-with-confirmation-page/244758/1 "2007-11-21T14:31:27Z")

</div>

I just recently implemented the php form mailer on this site and was wondering how to get it to send the user to an html page with a message that the information was sent rather than simply display text that it was sent from the echo in the php file.

---

<div class="post-metadata">

**Author:** ![phlegma](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@phlegma](https://forum.kirupa.com/u/phlegma)\
**Post date:** [June 7, 2008, 6:23pm UTC](https://forum.kirupa.com/t/php-form-with-confirmation-page/244758/2 "2008-06-07T18:23:10Z")

</div>

i would also like to like to a html rather than echoing through the php file, any idea how?

---

<div class="post-metadata">

**Author:** ![djheru](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/djheru/32/3190_2.png) [@djheru](https://forum.kirupa.com/u/djheru)\
**Post date:** [June 7, 2008, 6:45pm UTC](https://forum.kirupa.com/t/php-form-with-confirmation-page/244758/3 "2008-06-07T18:45:14Z")

</div>

I don’t mean to sound rude, but why on earth would you want to do that? You can just set up an if/else loop that checks to see if the mail was sent successfully, and if it was, you can echo the exact same html that you would display on the html confirmation page that you are considering.

If you insist, however, you can set up the if/else loop to redirect you to the confirmation page instead of displaying the “success” message.

```php

header("location:http://www.yourdomain.com/success.html");

```

---

<div class="post-metadata">

**Author:** ![phlegma](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@phlegma](https://forum.kirupa.com/u/phlegma)\
**Post date:** [June 7, 2008, 7:22pm UTC](https://forum.kirupa.com/t/php-form-with-confirmation-page/244758/4 "2008-06-07T19:22:22Z")

</div>

no worries, i just don’t understand php, that’s why i needed a bit of help. but thanks for the tips.

---

<div class="post-metadata">

**Author:** ![djheru](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/djheru/32/3190_2.png) [@djheru](https://forum.kirupa.com/u/djheru)\
**Post date:** [June 8, 2008, 2:51am UTC](https://forum.kirupa.com/t/php-form-with-confirmation-page/244758/5 "2008-06-08T02:51:05Z")

</div>

I’m not sure about the form mailer that you are using, but I have been using those for a while, and I have one that I’ve built and added to as I’ve gone along, and it addresses a lot of issues that simple introductory tutorials usually don’t address, such as how to get past spam filters on the server, how to ensure that the email address they enter is valid and using a specific email account to send the email. I would be happy to share if you are interested.
