I am currently working on making an html page that is protected by a password and whenever the correct password is submitted, this is added to the link: ?password=password. How do I prevent this from happening?
Code: https://pastebin.com/tcyKtbbv
So you want it as it is now except you don't what the "password" to show in the query string?
Add 'method="post" to the FORM tag.
https://htmlhelp.com/reference/html40/forms/form.html
Since you haven't specified a method it defaults to GET and the form data is passed in a query string.
You aren't going to use this for something important? Because it doesn't offer any real protection at all.
Thank you for the quick response! I won't be using for anything that serious, it's just for a school project. Thanks!
I suspected it was something like that. You're welcome.
Nothing seemed to change when I added (method="post"). The URL still changes. Here is my updated code:
https://pastebin.com/d85H5NwQ
Are you sure the HTML you are using is exactly the same as that at pastebin? Because it should work and does for me.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)