hydar Posted June 21, 2007 Share Posted June 21, 2007 i'm trying to make a client for a form on a website. i need to post a password to the site. it's usually done by a password field but I want to do it just with a php script, using http post. but i don't know how a password input field in html encrypts the password--it doesn't make sense that i could just send a php request such as site.com?password=hello123. any ideas? thanks Quote Link to comment https://forums.phpfreaks.com/topic/56595-how-to-post-password-to-website/ Share on other sites More sharing options...
Wildbug Posted June 21, 2007 Share Posted June 21, 2007 I've used client-side JavaScript to encode the password before POSTing it. Unless you do that, it's sent cleartext. My code only used cleartext if the browser didn't support or had JavaScript turned off so that use was transparent, but you could require JS if you had a site you really needed to keep secure. And with POST, at least it's not in the GET string. The other option is HTTPS. Quote Link to comment https://forums.phpfreaks.com/topic/56595-how-to-post-password-to-website/#findComment-279519 Share on other sites More sharing options...
trecool999 Posted June 21, 2007 Share Posted June 21, 2007 SendPassword.php <form id="Form" name="Form" action="EncryptPassword.php" method="POST"> <input type="text" value="Password" id="Password" name="Password" /> <input type="button" value="Go" id="Submit" name="Submit" /> </form> EncryptPassword.php <?php $Password = md5($_POST['Password']); header('Location: ReceivePassword.php'); ?> Then do whatever in ReceivePassword.php . Quote Link to comment https://forums.phpfreaks.com/topic/56595-how-to-post-password-to-website/#findComment-279555 Share on other sites More sharing options...
Wildbug Posted June 22, 2007 Share Posted June 22, 2007 The password is still passing between the client and server in cleartext in that example, tre. Quote Link to comment https://forums.phpfreaks.com/topic/56595-how-to-post-password-to-website/#findComment-280102 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.