I have a url that contains variables -
For Example: reset/password.php?var1=12345&?var2=abcde

I would like to know how I can remove (hide) the variables from the url, So no one knows with the values are -
But still use them on my page?

I am creating a password reset for a website I am working on.
So I will still need to use the variable values to update my database.

Just not sure how (or if possible) I can remove / hide the variables and values - So my url reads reset/password.php

Thanks everyone.

You can get the variables out of sight by using POST method in your form or call instead of GET which you are using in above example. If you use POST the variables won't be part of the URL instead they will be "hidden" in the HTTP header. Mind you the header can be inpsected by anyone with the access to the trafic so you should use TLS (https).

Yes as @broj1 said use post method so the varbles are no longer showen in the URL like this

<form action="welcome.php" method="post">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>

Or u can use Ajax with Post or Get

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.