I'm developing a website and in my attempt to make friendly URLs without recurring to mod_rewrite (because chances are my client's server doesent allow it), I came up with this system:
index.php expects a variable called $seccion, which should contain a relative path to a second file with a particular section. That way I keep the static stuff (header, footer, sidebars) all in index.php, and the only thing that changes is what's in the middle.
Then, if you go to /signup there is only an index.php which has:
<? $seccion = 'signup.php'; @include '../index.php'; ?>
The URL will be www.root.com/signup but it will actually be including www.root.com/index.php and loading www.root.com/signup.php in the center area.
This arrangement also means that everytime I need to link to a file, I have to use an absolute URL.
The problem is that now for some reason POST doesen't seem to be working. Suppose I've got a form in www.root.com/signup and the action is www.root.com/welcome, and it's supposed to send input through POST. Well, the information never gets through. PHP returns $_POST = Array( )
Any ideas?
edit: I forgot to mention that I had already come across the same problem previously in the development, and my solution back then was using ajax, and sending a POST request via jQuery. It's an elegant solution, but not what I always want.