I want to hide get variables in url
I want this
"dem/?p=user"
instead of whatever i passed like
dem/?p=user&act=stored
dem/?p=user&act=changed
dem/?p=user&act=deleted
Mates please help for me. Advance thanks.
I want to hide get variables in url
I want this
"dem/?p=user"
instead of whatever i passed like
dem/?p=user&act=stored
dem/?p=user&act=changed
dem/?p=user&act=deleted
Mates please help for me. Advance thanks.
If you want to hide GET variables or values you should not use GET. In GET methods the data will always be send as part of the url. If you want to 'hide' the data (or not show it in the URL) from the user you should use a POST method.
You may use any one of the following:
Obviously since you did not take the time to tell us how you page structure is and how you are storing your values I can only guess.
Server side
If you store the data on a post-redirect page you can store it in a $_SESSION
session_start();
if (isset($_SESSION['message']))
{
$_SESSION['message'] = "succes";
}
Then on your confirmation page
session_start();
echo $_SESSION['message'];
Client side
You can create hidden inputs and add these to your form, set your form to post and handle these $_POST
values on your form action page.
var x = document.createElement("INPUT");
x.setAttribute("type", "hidden");
x.setAttribute("name", "message");
form.appendChild(x);
Then on your confirmation page
if (isset($_POST['message']))
{
echo $_POST['message'];
}
modify .htaccess file to make short URLs the way you want them to look like