Email Forms - "Thank You" Page

Status
Not open for further replies.

JimShorts

Baseband Member
Messages
80
Hey guys I need to know how to do this by Friday so please respond! It's for a FBLA (Future Business Leaders of America) competition. Okay, here we go.

On my website I have a "contact us" form that I want to send an email to me. My problem is that I know how to make it send the email, and I know how to make a form that just links to a new page. BUT I don't know how to make the form send me an email and take the user to a "thank you" page.

I really need to know how to do this guys. Thanx.
 
Put the form on one page and in the form tag, put action="page2.php". Then on page2.php, put the PHP code for sending the email and the thank you message you want.

Hope this helped. :)
 
omfg I found one fbla guy!!!!!!!!!!!1 oh my god

you must be doing the webdesign competition, creating a website for a multimedia company right? I'm going to do the networking concept. last year I did that network design with another girl but we failed... and I don't like that network design, it's so stupid, you have to figure out a whole set of solution in scarcely 15 minutes.
 
Emily- Where do I learn how to post PHP code?

Harold- Yep, webdesign. I won Word Processing II last year. :) Good luck on the networking concepts.
 
Everybody, please call me Harold the second instead of Harold cuz the English King Harold was a dummy. please please please.

"*" means "<", "%" means ">"
in your contact page:
*form action="page2.php"%
name your subject field as subject. name your message field as message

you put your php code on your page2.php file, like:

*?php
function thanx() {
echo "Thank you for your comments!";
}

function failure() {
echo "My mailbox is not available right now, please contact later!";
}

$to="jimshorts@bhabhabha.com";

if (mail($to, $subject, $message)) {
thanx();
}
else {
failure();
}

//Emily is my teacher, so I answered for her:)
?>
 
Status
Not open for further replies.
Back
Top Bottom