开发者

cherrypy password form

开发者 https://www.devze.com 2023-04-12 09:23 出处:网络
I am trying to make a user registration and login for an application I\'m working on using the form below.

I am trying to make a user registration and login for an application I'm working on using the form below.

<html><form method="get"  action="login">
Email Address: <input name="email" type="text"><br/>
Password: <input name="password" type="password"><br/>
<input type="submit" value="Submit" />
</form>
</html>

However the user name and passwo开发者_JS百科rd show up in the url, as does the submit button.

http://localhost:8080/login?email=123&password=123&submit=Submit

How do I stop this happening?


They show up in the URL because your form is using the GET method, you should be using POST and processing the values on the server side.


In addition to the POST/GET confusion Shawn points out, you might be interested to look at Cherrypy's built-in authentication tool.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号