Home > Backend Development > PHP Tutorial > Email activation

Email activation

WBOY
Release: 2016-07-25 08:48:03
Original
778 people have browsed it
  1. session_start();
  2. header('Content-Type:text/html;charset=gb2312');
  3. include_once("conn/conn.php");
  4. if (!empty($_GET['name']) && !is_null($_GET['name'])){ //激活注册用户
  5. $num=$conne->getRowsNum("select * from tb_member where name='".$_GET['name']."' and password = '".$_GET['pwd']."'");
  6. if ($num>0){
  7. $upnum=$conne->uidRst("update tb_member set active = 1 where name='".$_GET['name']."' and password = '".$_GET['pwd']."'");
  8. if($upnum > 0){
  9. $_SESSION['name'] = $_GET['name'];
  10. echo "<script>alert('用户激活成功!');window.location.href='main.php';</script>";
  11. }else{
  12. echo "<script>alert('您已经激活!');window.location.href='main.php';</script>";
  13. }
  14. }else{
  15. echo "<script>alert('用户激活失败!');window.location.href='register.php';</script>";
  16. }
  17. }
  18. ?>
复制代码


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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template