Hi,
on a form I use 'action=$_SERVER["PHP_SELF"]' so that the data is send to same page for processing. Since the form 'gbw.php4' is located in the subdir 'crazy' PHP_SELF contains the absolute logical path '/crazy/gbw.php4'. All works well if the form is accessed via the original URL 'annwn.de/crazy/gbw.php4'.
Now I have another address 'crazy-store.org' which redirects to 'annwn.de/crazy/'. If you call the form via this URL, PHP_SELF nonetheless contains '/crazy/gbw.php4' which leads to a 404 when submitting the data.
As a quick workaround I hardcoded 'action="gbw.php4"', but to use a variable here would be nicer.
Any suggestions?
(The above URLs are online so you may try it out.)
Thanks in advance,
Dirk