Developer Support »

Using the referrer header to redirect to the form page to show errors  (See more user questions)

Hi .

Thank you for your purchase. Good to hear from you.

Have you tried it without the parameters, like:

$form_page_url = "";

Otherwise if the form page URL constantly changes, and cannot be hard-coded
into the script, you could try using the referrer header and redirect to
that. I have never been asked for such a thing before, but you could give
it a go. You would need to edit the script code.

Change this (line 1403 in a stock script):

header("location: $form_page_url"); exit; this:

header("location: {$_SERVER['HTTP_REFERER']}"); exit;

This relies on a referrer header being sent by the visitor's browser, which
it might not always be, although by default it will.

Any questions, just let me know.

Best wishes.

Charles Sweeney
The world's easiest feedback script!

----- Original Message -----
Sent: Tuesday, June 22, 2010 1:39 PM
Subject: FormToEmail script

> Comments: Hello,
> I have just purchased your pro version. I would like to display error
> messages on the form page. I am using a database driven site with dynamic
> pages eg I have forms on these type of pages:
> link.php?action=detail&id=72&custom=yes&TID=Enquiry This is not a static
> page. How do I enter the url for $form_page_url = ""; ?
> When I hit submit with an incorrectly completed form I get various error
> not found page messages. When I then hit back I see the original form with
> the correct error messages showing.
> Any thoughts?
> Thanks in advance,