首页 >后端开发 >php教程 >邮箱激活

邮箱激活

WBOY
WBOY原创
2016-07-25 08:48:03774浏览
  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. ?>
复制代码


声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn