Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ How To Stop The Web Page Title From Becoming the Password when Entered

Posted by: MoodyCurry2001 Feb 20 2024, 04:06 PM

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

Posted by: pandy Feb 20 2024, 04:35 PM

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.

Posted by: MoodyCurry2001 Feb 20 2024, 05:39 PM

Thank you for the quick response! I won't be using for anything that serious, it's just for a school project. Thanks!

Posted by: pandy Feb 20 2024, 07:02 PM

I suspected it was something like that. You're welcome. happy.gif

Posted by: MoodyCurry2001 Feb 22 2024, 02:19 PM

Nothing seemed to change when I added (method="post"). The URL still changes. Here is my updated code:

https://pastebin.com/d85H5NwQ

Posted by: pandy Feb 24 2024, 02:24 PM

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)