Home > Backend Development > PHP Tutorial > PHP remember username and password implementation code (cookie)_PHP tutorial

PHP remember username and password implementation code (cookie)_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:49:41
Original
3586 people have browsed it

remember.php




   
   
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
记住用户名和密码
用 户 名:
密码:
记住用户名和密码


 
check_remember.php

  $name = $_POST['name'];
  $password = $_POST['password'];
  $remember = $_POST['remember'];
  if($remember == 1){
  setcookie('name',$name,time()+3600);
  setcookie('password',$password,time()+3600);
  setcookie('remember',$remember,time()+3600);
  }else{
  setcookie('name',$name,time()-3600);
  setcookie('password',$password,time()-3600);
  setcookie('remember',$remember,time()-3600);
  }
  echo "返回";
?> 

摘自 天天笑一下

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/478333.htmlTechArticleremember.php 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 cel...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template