Html page using action to send a value to another page

Question:
I am trying to make my first site, index.html, send a value (keylist) to receptionOFpassword.html, using action. I tried with GET, but i don’t want it to be displayed temporarily and not globally in the link. I want it to be shown on receptionOFpassword and saved GLOBALLY, so that unless another keylist (password) is entered, no matter from where or from which device you use, it will always show the same thing.
So in index.html, i get the password under PasswordTObePROSSESSED. The reason why i want to display it is for me to be able to be 100% sure that it is saved in the website (receptionOFpassword.html). Then i will hide it and encrypt every password to secure them, mabe even on another site.

Any kind of help is appreciated,
Chip01

index.html:


    <form action="receptionOFpassword.html" method="GET">

    <div class="passwordpositionFORIPAD"> \\there is another class that positions it for pc, because the screen height and width aren’t the same
    <label for="PasswordTObePROSSESSED"></label>
    <input type="password" placeholder="Mot de passe" name="PasswordTObePROSSESSED" maxlength="45" style="font-size:18px; width: 406px; height: 33px; border-radius: 6px; border-width: 0.2px; border-color: #17B0CB;">
    </div>

1 Like

If you have solved the problem, please provide information on how you did it to help other users in the future. If not, can you please clarify what you mean?

3 Likes

so I added a couple of things and it still doesnt work;


<form action="/receptionOFpassword.html" method="post">
    
    <div class="passwordpositionFORIPAD">
    <label for="PasswordTObePROSSESSED"></label>
    <input type="password" placeholder="Mot de passe" name="PasswordTObePROSSESSED" id="PasswordTObePROSSESSED" onkeydown="myFunction(event)" maxlength="45" style="font-size:18px; width: 406px; height: 33px; border-radius: 6px; border-width: 0.2px; border-color: #17B0CB;">
    </div>

    <div class="AccessPositionFORIPAD">
      <button type="submit" style="color:white; width:422px; height: 40px; font-size:15px; border-radius: 7px; border-color:#6699CC; border-width:0.5px;background-color:#008dc3;">Acc&eacute;der</button>
    </div>
  
  </form>

I want it to save in the website memory of receptionOFpassword.html the password, preferably using action. And if possible, I’d like it to be displayed in receptionOFpassword.html, for me to be sure that it is saved.

1 Like

I also don’t know if I should use POST or GET;
Since I really have a hard time with POST,
and
GET works, but shows it in the link and I can’t get it out of the link to save it globally/superglobally, not even to display it…

1 Like

POST is typically when you have a server that can receive the headers. So you’ll want to use GET if you’re trying to send the form information to another page through URL parameters.

4 Likes

@EmmanuelGhattas You might have to use a backend for this tssk that you are trying to achieve.

3 Likes

So how can i get the information I need out of the url, in HTML?
(inside receptionOFpassword.html)

2 Likes

You can search that up. I think it has something to do with URLSearchParameters, but I forgot.

1 Like
const params = new URLSearchParams(window.location.search);
params.get("some param"); // (`null` if param is not supplied)

Will allow you to access search parameters in JavaScript.

3 Likes