For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > March 2006 > "Thank you" after form entry









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author "Thank you" after form entry
Mark Stanton

2006-03-26, 6:57 pm

I currently have an almost entirely static html site and am just
starting to use form entry.

On the (only) page like this my button runs a php script that
collects the entered information and mails it to us, it works.

However, that leaves the user with a blank screen, now with an error
message.

I'd like the user to be either presented with a "thank you" screen,
or returned to somewhere sensible on the site, both of which I
suspect are really the same problem.

For other projects I've been using an ecommerce framework (a little)
so I know about feeding the server a whole load of html to get it to
generate a page, but for just one, or even only a few, pages this
seems like a huge price to pay.

Is there an easy(er) way to get done what I want?

The (still not-really live) page can be found at
www.vowleyfarm.co.uk/New%20Site/FoVF.htm

?
Many thanks
Mark Stanton
One small step for mankind...

Spanker

2006-03-26, 9:57 pm

> Parse error: parse error, unexpected T_STRING in /files/home3/vowleyfarm/php/farm/modules/actions/submitFoVF.php on line 104

looks like you are missing a ; somewhere


the way to print out a simple thank you is the following


print "<html><h1>Thank You</h1></html";

Mark Stanton

2006-03-27, 7:56 am

Was missing a single quote 8-(

Many thanks
(errr, echo("<html><h1>Thanks Spanker!</h1></html>") )

that should sort it out!

Must've got my wrong head on last night 8-(

8-)
Mark Stanton
One small step for mankind...


Alexander Meins

2006-03-28, 6:57 pm

Mark Stanton schrieb:

> I'd like the user to be either presented with a "thank you" screen,
> or returned to somewhere sensible on the site, both of which I
> suspect are really the same problem.


This works for me:
Redirecting to a thank you page after sending the e-mail

header ("Location: ./thankyou.php" );
exit;

A.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com