Forum Moderators: coopster

Message Too Old, No Replies

I just want a simple thank you page!?

Once a user submits a form, custom thank you page...

         

casey133

10:29 am on Feb 11, 2005 (gmt 0)

10+ Year Member



Hello all, here is my problem; I have just some simple forms on my website, a contact page, etc… I am using jacks form mail.php to process the forms; now the only thing I need help with here is once the visitor submits their form, I want it to take them to a custom thank you page… very simple I am sure, instead it takes them to a generic thank you page. Does anyone know how I can make this happen, or if there is an easier to use php form processor script (free) I would be very grateful.
Thanks in advance

jatar_k

5:47 pm on Feb 11, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Do you know where the generic page is located? I would just edit the page it is using now and make that a little fancier.

mcibor

10:10 pm on Feb 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you don't know where the generic page is, just look at the file with the form, or the source code and see what's written in <form action="Here's the desired url"
Certainly the next file will be written in php, but that's no problem, isn't it?

Hope to help!
Michal Cibor

casey133

11:42 pm on Feb 11, 2005 (gmt 0)

10+ Year Member



the php file is in my rood dir, where the index.html page is; so just place the html code i want to show up where the thank you text is?

mcibor

11:12 am on Feb 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes. Use the $_POST["here var from the form"] to get relevant information you want to put on the thank you page.
Eg in the form you've got:

<form action="index.php" method="POST">
First name<input type="text" name="1name" id="1name"/>
Surname<input type="text" name="sname" id="sname"/>
<input type="submit" value="Submit"/>
</form>

then in the Thank you page you can use these inputed values:

<p>Thank you <?PHP echo $_POST["1name"]." ".$_POST["sname"];?> for completing the form.</p>

If someone entered values: Michal in the 1name field and Cibor in the surname field, then the thank you text would be:
Thank you Michal Cibor for completing the form.

The dot in echo allows to combine two strings (one from _POST and one with space in it. " " - this is space string.

Hope this helps
Best regards
Michal Cibor