您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php中cookie实现记住用户名与密码的代码(图文)

2025/7/5 19:10:01发布23次查看
php cookie实现记住用户名与密码的代码
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <form id="form1" name="form1" method="post" action="check_remember.php"> <table width="300" border="1" align="center" cellpadding="0" cellspacing="0"> <thead> <tr> <td colspan="2" align="center"><b>记住用户名和密码</b></td> </tr> </thead> <tr align="center"> <td>用 户 名:</td> <td><input type="text" value="<?php echo $_cookie['name'];?>" name="name"></td> </tr> <tr align="center"> <td>密码:</td> <td><input type="password" name="password" value="<?php echo $_cookie['password']?>"></td> </tr> <tr align="center"> <td>记住用户名和密码</td> <td><?php if($_cookie['remember'] == 1){?><input type="checkbox" name="remember" value="1" checked> <?php }else{($_cookie['remember'] == "")?><input type="checkbox" name="remember" value="1"><?php }?></td> </tr> <tr align="center"> <td colspan="2"><input type="submit" name="submit" value="提交" /></td> </tr> </table> </form>
2、检测密码的页面-check_remember.php
以上就是php cookie实现记住用户名与密码的代码(图文) 的内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product