Email activation-php Tutorial

Source: Internet
Author: User
Email activation
<无详细内容>

  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']) {// activate a registered user
  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 ('User activated successfully! '); Window. location. href = 'main. php'; script ";
  11. } Else {
  12. Echo "script" alert ('you have activated it! '); Window. location. href = 'main. php'; script ";
  13. }
  14. } Else {
  15. Echo "script alert ('User activation failed! '); Window. location. href = 'Register. php'; script ";
  16. }
  17. }
  18. ?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.