harmor wrote:I'm not sure if someone could do this...
But someone could copy your form, change the action.
Change the drop down to a test box with the same name "sfile".
They could input "../../../etc/passwrd" to get your password.
Again, I'm not sure if that is 100% true.
Thanks for your correction, harmor.
I changed that line of code in my script above.
to your question:
If someone can do this, copy my form etc and upload or use a remote script
and so get my password,
then not only my script, but just about anything at such a webspace
would be so unsecure
that you better not use such a website.
Has got nothing to do with my script.
My script is supposed to be only used by the admin or user with login access,
and could be a part of other php pages, forms, editors or file manager scripts.
And so would have some sort of authtentiation, login from the main script
or this script may be used only in such folders where admin and nobody else has permission.
I will NOT add a 100% secure login with md5 hashed password function
with password stored outside webpages root
to every little script or function I submit here.
If you or somebody wants to know how you make a login to your stuff, secure your php pages
and handle security issues at a more normal php level,
you have to serach elsewhere at this website and at the internet.
There are plenty of articles and tutorials in this matter of PHP Security to find.
If you search and learn a bit.
Regards
halojoy
.