Results 1 to 5 of 5

Thread: Formmail script won't work in a subdirectory?

  1. #1
    Join Date
    Nov 2012
    Posts
    7

    Default Formmail script won't work in a subdirectory?

    I have a subdirectory on my hosting account where I keep a secondary website, which is separate from my primary website. If I put my formmail.php file in the subdirectory and reference it there in my form, I get this message when I submit a form:

    This URL is a Form submission program.

    It appears the form is not working correctly as there was no data found.
    You're not supposed to browse to this URL; it should be accessed from a form.


    But if I put the same file in the main directory of my account (the primary website) and reference it there in my form, it works fine. Why won't it work from within the subdirectory?

  2. #2
    Join Date
    Nov 2006
    Posts
    28

    Default Re: Formmail script won't work in a subdirectory?

    I run this form in sub-directories / subdomains often and have not had any issues.

    I would suggest carefully going over the formstomail.php and your index file to verify you have all instances of the domain and location correct.
    Lori

  3. #3
    Join Date
    Nov 2012
    Posts
    7

    Default Re: Formmail script won't work in a subdirectory?

    The fact that I get that error message proves the URLs are all correct, but for some reason it's trying to load the php file in the browser window instead of using it to process the form data.

  4. #4
    Join Date
    Nov 2006
    Posts
    28

    Default Re: Formmail script won't work in a subdirectory?

    Do you have all the files in the same folder or are you trying to pull parts from the main directory folder?

  5. #5
    Join Date
    Nov 2012
    Posts
    7

    Question Re: Formmail script won't work in a subdirectory?

    I tried removing the http:// and the domain from the path of the script, and it worked. I don't know why it doesn't work with an absolute path. It must have something to do with the fact that that domain is tied to a subdirectory. At other times, when dealing with a domain that is not tied to a subdirectory, I've always used an absolute path.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help with my FormMail Script!!!?
    By Gavinie in forum Community Support
    Replies: 0
    Last Post: 18-Aug-2012, 09:23 AM
  2. FormMail Script Error - Need Help
    By ASBee in forum Community Support
    Replies: 1
    Last Post: 31-Oct-2008, 02:45 AM
  3. FormMail script error
    By MikeS in forum Community Support
    Replies: 0
    Last Post: 09-Oct-2008, 04:38 AM
  4. FormMail script error (Sample FormMail Testing)
    By GVCHS in forum FormMailEncoder/Decoder
    Replies: 12
    Last Post: 07-Oct-2008, 08:33 PM
  5. FormMail script error (Sample FormMail Testing)
    By Syllia in forum Community Support
    Replies: 6
    Last Post: 22-Aug-2007, 11:17 PM

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
  •