![]() |
![]() ![]() |
![]() |
MoodyCurry2001 |
![]()
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 |
pandy |
![]()
Post
#2
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,737 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. |
MoodyCurry2001 |
![]()
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!
|
pandy |
![]()
Post
#4
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,737 Joined: 9-August 06 Member No.: 6 ![]() |
I suspected it was something like that. You're welcome.
![]() |
MoodyCurry2001 |
![]()
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 |
pandy |
![]()
Post
#6
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,737 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.
|
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 14th June 2024 - 08:46 PM |