I built a small form that works as expected when the action URL is in the same directory as the form URL. When I move the action URL to a subdirectory, the form still can submit to the action URL, but the fields are not “posted.”
@anwokoauthorApr 11.2010 — #Thanks for your reply donatello. The form does submit fields with GET, but as you can see from the code, I think I should use POST because it is relatively sensitive information.
To the beginning of your processing page and change the form to post. This will print out the $_POST superglobal array, see if your variables are printed out when you submit the form.
@anwokoauthorApr 12.2010 — #I just tried _REQUEST. Still nothing.
The only time I've seen this problem was when I tried using SESSION variables between directories. I would set the SESSION variable in one directory and it woouldn't exist in the next. I found something that talked about passing a sessionID as a GET variable in the address line and solved the problem that way.
Now I have the problem of not being able to use POST from directory to directory
@EinsteinsEyesApr 12.2010 — #Sounds more like a security setting. I believe it is possible that the settings are such that post simply will not work. I think that would be very unusual. If the file is a php file. PHP scripting should be possible. Does the php work in the directory normally? Is the original form and processing directory a cgi-bin or something directory designated to run scripts?
@anwokoauthorApr 12.2010 — #Whoaa! A little over my head there. The php in the directory does work normally...I think. I'm using a hosted server, so I didn't really do set-ups on that level. It gives me something to research though, so thanks.
@EinsteinsEyesApr 12.2010 — #Unfortunately you might have to create a support ticket and show them your issue. I am sure they just set it up that way by default to protect the servers. At least I hope that is the reason. Best of Luck.