Usually when I write a form in html, I put the action as :
[PHP]action="<?php echo $_SERVER['REQUEST_URI']; ?>"[/PHP]
Now in my page I obviously include() the thing I want my form to do. So how it works is it checks the variables that have been sent, and if they are what is expected then it does the rest of my code. Now why I do that is so that if you go view page source, your will only see the current pages URL in the action part.
Obviously the alternative is to have action to point straight to the file so that it actually posts the data to another file rather than itself. So I wanted to know your thoughts on if I am being over protective, or if this is standard practice, or if this is a waste of time and you have no idea why I do this?
Without hacking in the server, is there a way to view the php of a php file if you know the file location?
Cheers,
TS
[PHP]action="<?php echo $_SERVER['REQUEST_URI']; ?>"[/PHP]
Now in my page I obviously include() the thing I want my form to do. So how it works is it checks the variables that have been sent, and if they are what is expected then it does the rest of my code. Now why I do that is so that if you go view page source, your will only see the current pages URL in the action part.
Obviously the alternative is to have action to point straight to the file so that it actually posts the data to another file rather than itself. So I wanted to know your thoughts on if I am being over protective, or if this is standard practice, or if this is a waste of time and you have no idea why I do this?
Without hacking in the server, is there a way to view the php of a php file if you know the file location?
Cheers,
TS
Comment