The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How To Stop The Web Page Title From Becoming the Password when Entered
MoodyCurry2001
post Feb 20 2024, 04:06 PM
Post #1





Group: Members
Posts: 3
Joined: 20-February 24
Member No.: 29,133



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 20 2024, 04:35 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MoodyCurry2001
post Feb 20 2024, 05:39 PM
Post #3





Group: Members
Posts: 3
Joined: 20-February 24
Member No.: 29,133



Thank you for the quick response! I won't be using for anything that serious, it's just for a school project. Thanks!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 20 2024, 07:02 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



I suspected it was something like that. You're welcome. happy.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MoodyCurry2001
post Feb 22 2024, 02:19 PM
Post #5





Group: Members
Posts: 3
Joined: 20-February 24
Member No.: 29,133



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

https://pastebin.com/d85H5NwQ
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 24 2024, 02:24 PM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



Are you sure the HTML you are using is exactly the same as that at pastebin? Because it should work and does for me.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 09:46 AM