Page 1 of 1

php thank you page

Posted: Thu Dec 16, 2004 12:35 pm
by obi_wasabi
at the following url
working.ckimedia.com/contact.php

I've a form with JS validation, I want to generate a custom thank you page that use the name, e-mail, and comments as a receipt. "Thank you $name @ $email you commented: $comments. A reply will arrive shortly."

I don't want to change the form too much as the JS validation was a hefty lesson?

Posted: Thu Dec 16, 2004 1:47 pm
by rehfeld
what specifically are you having a problem with?

the logic is something very basic like this


Code: Select all

if (all fields complete) {
    // send email, then
    echo "
<p>thank you for your email, $name ( $email )<br>
your email was sent as follows:</p>
<div>$comments</div>
";
}

you may want to look at nl2br()
youll prob want to use that on the $comments



btw- very nice design.

php thank you page

Posted: Thu Dec 16, 2004 1:59 pm
by obi_wasabi
Hi,

My problem with my newbie understanding is implementing the script. Does it need be on the thank you page, if not how does one implement it in the current contact page? Should I use a thank you pop-up window?

I have a strange learning curve, the site is served with all includes, the doctype is altered per user agent. However this simple thing gives me pause.


CK

PS
Thanks for your compliment on the design

Posted: Thu Dec 16, 2004 3:30 pm
by xisle
Since you are using JS for the form validation, you could use document.write or window.open
whatever you want really.