Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Redirect to my page on submit

  1. #1
    Join Date
    Apr 2004
    Posts
    13

    Question Redirect to my page on submit

    I tried your script and it works great. The only problem that I have is configuring the "good_url" and "bad_url" to redirect to my own page after someone fills in their information and presses the "submit" button. The page I am having trouble with is located at www.nusqu.com/contact.html. Please help!

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Redirect to my page on submit

    Hi,

    It looks like your web server is trying to be clever but gets it wrong.

    I submitted your form and the web server told me there were two possible "confirm.html" documents: ./confirm.html and ../confirm.html.

    I've never seen a web server do this before, so I can only guess....

    Try putting a "/" in front of the document, like this:
    Code:
      <input type="hidden" name="good_url" value="/confirm.html">
    or, better still, use a full URL:

    Code:
      <input type="hidden" name="good_url" value="http://www.nusqu.com/confirm.html">
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Apr 2004
    Posts
    13

    Default Re: Redirect to my page on submit

    I tried it and it doesn't work. Do I have to change the Formail.php file and if so where do I make the changes?



    Quote Originally Posted by russellr
    Hi,

    It looks like your web server is trying to be clever but gets it wrong.

    I submitted your form and the web server told me there were two possible "confirm.html" documents: ./confirm.html and ../confirm.html.

    I've never seen a web server do this before, so I can only guess....

    Try putting a "/" in front of the document, like this:
    Code:
     <input type="hidden" name="good_url" value="/confirm.html">
    or, better still, use a full URL:

    Code:
     <input type="hidden" name="good_url" value="http://www.nusqu.com/confirm.html">

  4. #4
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Redirect to my page on submit

    Hi,

    I've some more testing of your form and your server is behaving very strangely.

    The only thing you should change in formmail.php is $TARGET_EMAIL (around line 481).

    If you have changed anything else, that might be the cause of the problem.

    If you send me your configured formmail.php, I'll confirm that it hasn't been broken.

    To see what strange behaviour I'm seeing, set the "good_url" value to "/fred.html". Reload your form (refresh the browser) and submit again: your server still says it's trying to find "confirm.html"!

    Something is very broken.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Apr 2004
    Posts
    13

    Default Re: Redirect to my page on submit

    Thanks for your help. Where do I send the file to?

    Quote Originally Posted by russellr
    Hi,

    I've some more testing of your form and your server is behaving very strangely.

    The only thing you should change in formmail.php is $TARGET_EMAIL (around line 481).

    If you have changed anything else, that might be the cause of the problem.

    If you send me your configured formmail.php, I'll confirm that it hasn't been broken.

    To see what strange behaviour I'm seeing, set the "good_url" value to "/fred.html". Reload your form (refresh the browser) and submit again: your server still says it's trying to find "confirm.html"!

    Something is very broken.

  6. #6
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Redirect to my page on submit

    Hi,

    You can attach it to a post on this forum or just email it to custsupp AT tectite DOT com.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  7. #7
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Redirect to my page on submit

    Hi,

    Your setting is currently:

    PHP Code:
      $TARGET_EMAIL = array(EMAIL_NAME."info@nusqu\.com$"); 
    It needs to be either:

    PHP Code:
      $TARGET_EMAIL = array("^info@nusqu\.com$"); 
    or

    PHP Code:
      $TARGET_EMAIL = array(EMAIL_NAME."@nusqu\.com$"); 
    However, that's not the cause of the problem you reported.

    Here's what I recommend:
    1. Fix your $TARGET_EMAIL setting as above.
    2. Remove the "good_url" and "bad_url" hidden fields from your HTML form.
    3. Confirm that the form submits correctly and sends you email OK.
    4. Add the "good_url" field back to the HTML form.
    Let me know when you get to this point.

    I think your server is behaving very strangely, and you may need to contact your hosting provider to get a proper solution.

    However, we'll work with you to try and figure out exactly what's going on.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  8. #8
    Join Date
    Apr 2004
    Posts
    13

    Default Re: Redirect to my page on submit

    It's now working. I thank you so much for your help. I was wondering, how do I add the "bad_url" field to my html page so that is works also?
    Quote Originally Posted by russellr
    Hi,

    Your setting is currently:

    PHP Code:
     $TARGET_EMAIL = array(EMAIL_NAME."info@nusqu\.com$"); 
    It needs to be either:

    PHP Code:
     $TARGET_EMAIL = array("^info@nusqu\.com$"); 
    or

    PHP Code:
     $TARGET_EMAIL = array(EMAIL_NAME."@nusqu\.com$"); 
    However, that's not the cause of the problem you reported.

    Here's what I recommend:
    1. Fix your $TARGET_EMAIL setting as above.
    2. Remove the "good_url" and "bad_url" hidden fields from your HTML form.
    3. Confirm that the form submits correctly and sends you email OK.
    4. Add the "good_url" field back to the HTML form.
    Let me know when you get to this point.

    I think your server is behaving very strangely, and you may need to contact your hosting provider to get a proper solution.

    However, we'll work with you to try and figure out exactly what's going on.

  9. #9
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Redirect to my page on submit

    Hi,

    That's good news. Do you know what fixed the problem?

    To add the bad_url component, just add a field similar to the good_url.

    However, if you want to display the error message you'll need to write a script instead of a straight HTML page.

    Get the HTML page working for your bad_url, then we'll discuss where to go from there.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  10. #10
    Join Date
    Apr 2004
    Posts
    13

    Default Re: Redirect to my page on submit

    Thanks. I got the page working correctly.

    Quote Originally Posted by russellr
    Hi,

    That's good news. Do you know what fixed the problem?

    To add the bad_url component, just add a field similar to the good_url.

    However, if you want to display the error message you'll need to write a script instead of a straight HTML page.

    Get the HTML page working for your bad_url, then we'll discuss where to go from there.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Error when submit is clicked
    By thall1908 in forum FormMail Subscription Support
    Replies: 6
    Last Post: 11-Nov-2004, 11:28 PM
  2. Redirect NOT working
    By LordWulf in forum FormMail Subscription Support
    Replies: 3
    Last Post: 21-Aug-2004, 09:47 PM
  3. Now I am stomped! URL for redirect
    By sigurdur in forum FormMail Subscription Support
    Replies: 3
    Last Post: 01-Aug-2004, 12:02 AM
  4. CPU Maxed after (maybe?) double click of submit?
    By OKUser in forum FormMail Subscription Support
    Replies: 6
    Last Post: 23-Jun-2004, 07:33 PM
  5. Link to your own REDIRECT page?
    By cottonslurpy in forum FormMail Subscription Support
    Replies: 2
    Last Post: 17-Jun-2004, 08:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •