Results 1 to 9 of 9

Thread: $return_link is not working

  1. #1
    Join Date
    Aug 2010
    Posts
    22

    Question $return_link is not working

    I have a <a href="$return_link">Return</a> on my error page wich I am using in conjunction with fmbadhandler.php.

    When I click the link, it sends me to a page not found.

    ----------------------------------------------------

    In formmail.php:
    $TARGET_EMAIL = array("^kyleih@optonline\.net$");
    define("DEF_ALERT","kyleih@optonline.net");
    $TARGET_URLS = array("http://www.mercercountyrealtors.com/");
    $TEMPLATEDIR = "var/chroot/home/content/i/r/e/irenaiwaniec/html/mercercountyrealtors_com/previewPurple/templates"; // directory for template files; empty string
    $TEMPLATEURL = "http://www.mercercountyrealtors_com/previewPurple/templates/template.php";

    ----------------------------------------------------


    In template.php:
    <fmerroritemlist />

    <a href="$return_link">Return</a>

    ----------------------------------------------------


    In contact form:
    <input type="hidden" name="bad_url"
    value="http://www.mercercountyrealtors.com/previewPurple/fmbadhandler/fmbadhandler.php" />
    <input type="hidden" name="bad_template" value="http://www.mercercountyrealtors.com/previewPurple/templates/template.php" />
    <input type="hidden" name="this_form" value="http://www.mercercountyrealtors.com/previewPurple/contact.php" />
    <input type="hidden" name="good_url" value="http://www.mercercountyrealtors.com/previewPurple/thankYou.php" />
    Last edited by kyle; 07-Aug-2010 at 05:38 PM. Reason: made some changes to my code, but still not working

  2. #2
    Join Date
    May 2008
    Posts
    1,291

    Default Re: $return_link is not working

    You don't want to use both $TEMPLATEURL and $TEMPLATEDIR.

    However, if you're using $TEMPLATEURL, get rid of $TEMPLATEDIR and fix the url in $TEMPLATEURL. You have an underscore instead of the dot before .com.

    If using $TEMPLATEDIR, then your bad_template setting in the form should just include the file name, not the entire url.

    Hope that helps.

  3. #3
    Join Date
    Aug 2010
    Posts
    22

    Default Re: $return_link is not working

    I've gotten rid of the TEMPLATEDIR setting. I'm getting this error:

    fopen(http://www.mercercountyrealtors.com/.../template.html

    But I don't have a template.html file.

    As far as the underscore, that is the actual REAL_DOCUMENT_ROOT that was sent to me via the testalert=1

    ?

  4. #4
    Join Date
    Aug 2010
    Posts
    22

    Default Re: $return_link is not working

    oops, that _ was not where I thought it was. I fixed it.

    But I'm still getting the same error as above.

  5. #5
    Join Date
    Aug 2010
    Posts
    22

    Default Re: $return_link is not working

    I made all the changes you suggested, and I'm still being brought to this page:

    http://www.mercercountyrealtors.com/previewPurple/fmbadhandler/$return_link

    which, is "not found"

  6. #6
    Join Date
    May 2008
    Posts
    1,291

    Default Re: $return_link is not working

    The $TEMPLATEDIR setting which includes a server path "does" use the underscore, but the url ($TEMPLATEURL) should have the dot.

  7. #7
    Join Date
    May 2008
    Posts
    1,291

    Default Re: $return_link is not working

    The other possibility is that your hosting service does not support fopen(), in which case you'll need to use $TEMPLATEDIR instead of $TEMPLATEURL. When you do that, then you need to just use "template.php" as the bad_template setting in the form.

    Another thing I would try is putting fmbadhandler in the same directory as formmail, and make sure that you adjust your settings in the form.
    Last edited by ginger23; 07-Aug-2010 at 07:08 PM.

  8. #8
    Join Date
    Aug 2010
    Posts
    22

    Default Re: $return_link is not working

    I'm sorry, I had another _ in the wrong place. It's from all that copying and pasting

    Thanks a million, it's working.

    Now on to the next issue...

  9. #9
    Join Date
    May 2008
    Posts
    1,291

    Default Re: $return_link is not working

    Glad it's working.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problem using return_link...
    By mjdublah in forum Community Support
    Replies: 1
    Last Post: 25-May-2006, 12:18 PM
  2. Problem with $return_link
    By dynamo in forum Community Support
    Replies: 1
    Last Post: 09-Mar-2006, 10:57 AM
  3. $return_link
    By dynamo in forum FormMail Subscription Support
    Replies: 2
    Last Post: 09-Mar-2006, 09:45 AM
  4. "<return_link/>" not parsed
    By johnny in forum FormMail Subscription Support
    Replies: 4
    Last Post: 19-Jun-2005, 02:30 AM
  5. Problem with return_link
    By antix in forum FormMail Subscription Support
    Replies: 9
    Last Post: 13-Sep-2004, 09:25 AM

Tags for this Thread

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
  •