6 replies
  • WEB DESIGN
  • |
I have a simple script that I am running from WordPress.

When I use this command and put the script in root, it works.

<form action="/Test.php" method="post">

When I use this command with the script in a folder called newfolder, it won't work.

<form action="/newfolder/Test.php" method="post">

What am I doing wrong? I plan on having several scripts and don't want them all in root.

Thank you in advance.

Steve
#question #script
  • Profile picture of the author Andrew Polanski
    Steve,

    Have you tried doing the full URL? Add the rest of your domain name before /newfolder. Maybe that will solve your issue.

    Regards,
    Andrew Polanski
    Signature
    AndrewPolanski.com - 19 Year Old Internet Marketer
    Local Niche Power - Exact Strategy Used to Generate $450,000 in 3 Months
    {{ DiscussionBoard.errors[4984049].message }}
  • Profile picture of the author johnnyN
    Hi Steve,
    first try what Andrew suggests.

    then you need to determine if your form is working.
    normally I would use a firefox plugin called httpfox to do this.
    it can monitor what happens when you click submit, and even tell you what the form has submitted to the url.

    I would guess that the form is working ok, and the issue is not on the form side, but on the receiving side.
    {{ DiscussionBoard.errors[4984997].message }}
    • Profile picture of the author SteveSch
      Originally Posted by OBaz View Post

      Full url must sort you out.

      If you look in php tutorials you will see that path declared in your script won't work out for php files.
      Thanks. I'll read up on this.

      Originally Posted by johnnyN View Post

      then you need to determine if your form is working.
      normally I would use a firefox plugin called httpfox to do this.
      it can monitor what happens when you click submit, and even tell you what the form has submitted to the url.

      I would guess that the form is working ok, and the issue is not on the form side, but on the receiving side.
      Sounds like a great plugin. The form works fine when the script is in root. I am going to have several scripts and need them in separate directories.

      Originally Posted by Andrew Polanski View Post

      Steve,

      Have you tried doing the full URL? Add the rest of your domain name before /newfolder. Maybe that will solve your issue.

      Regards,
      Andrew Polanski
      Yes, it still didn't work.

      Thanks all for the advice. I will post the answer here when I figure it out.

      Steve
      {{ DiscussionBoard.errors[5014388].message }}
  • Profile picture of the author OBaz
    Full url must sort you out.

    If you look in php tutorials you will see that path declared in your script won't work out for php files.
    {{ DiscussionBoard.errors[4993820].message }}
  • Profile picture of the author ussher
    not enough info.

    all you have here is the top of a form header.

    the form presumably will have input fields and a submit button.

    From the information you have provided it seams to be that you have a form that is submitted to a file called "Test.php". We dont know what file that form is IN and we dont know if Test.php is even IN the folder that you are posting it to.

    saying "it didn't work." is not helpful. you need to say how it didnt work if you expect to get help.

    if by "it didnt work" the browser returned a page with the error "404 file not found" at the url /newfolder/Test.php This is completely different than "500 Internal server error" and the answer about how to fix it will be different.

    Also by "It didnt work" you need to tell us what is supposed to happen when it does work.
    Signature

    "Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."

    - jamroom.net
    Download Jamroom free: Download
    {{ DiscussionBoard.errors[5018011].message }}
  • Profile picture of the author vjboc
    Is the form in the new folder? If so, how about
    <form action="/newfolder.php" method="post">
    {{ DiscussionBoard.errors[5022381].message }}

Trending Topics