xenoalien Posted March 21, 2009 Share Posted March 21, 2009 I am making a simple login and I do not want the username and password variables to be shown in the link. For example: .com/register.php?user=samstockton&pass=password Those variables are passed from the regsiter.html file's input form. How do I not show the variables up top? Thanks Link to comment https://forums.phpfreaks.com/topic/150494-how-do-i-get-variables-to-not-show-up-in-the-link-of-a-browser/ Share on other sites More sharing options...
bobbinsbro Posted March 21, 2009 Share Posted March 21, 2009 set the method attribute in the html <form> to be method="post" (like this <form method="post") and in the php code retrieve the variables via the $_POST superglobal instead of the $_GET. Link to comment https://forums.phpfreaks.com/topic/150494-how-do-i-get-variables-to-not-show-up-in-the-link-of-a-browser/#findComment-790437 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.