Script Question

by 6 replies
7
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
#website design #question #script
  • 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
    • [ 1 ] Thanks
  • 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.
    • [ 1 ] Thanks
    • [1] reply
    • Thanks. I'll read up on this.

      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.

      Yes, it still didn't work.

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

      Steve
  • 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.
    • [ 1 ] Thanks
  • 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.
  • Is the form in the new folder? If so, how about
    <form action="/newfolder.php" method="post">
  • Banned
    [DELETED]

Next Topics on Trending Feed