我们在激活您的帐户时遇到问题

时间:2012-06-28 11:00:29

标签: php mysql database phpmyadmin

当电子邮件激活此错误消息“我们在激活您的帐户时出现问题”

我激活代码的任何问题.. ??? 代码在下方提供..

'activate.php'

<?php 
    include 'core/init.php';
    logged_in_redirect();
    include 'includes/overall/header.php';

    if (isset($_GET['success']) === true && empty($_GET['success']) === true) {
    ?>
        <h2>Thanks, we've activated your account....</h2>
        <p>You're free to Log in!</p>

    <?php

    } else if (isset($_GET['email'], $_GET['email_code']) === true) {

        $email      = trim($_GET['email']);
        $email_code   = trim($_GET['email_code']);

        if (email_exists($email) === false) {
            $errors[] = 'Oops, something went wrong and we could\'t find that email address';
        } else if (activate($email, $email_code) === false) {
            $errors[] = 'We had problems activating your account';
        }

        if (empty($errors) === false) {
        ?>
            <h2>Ooops...</h2>
        <?php
            echo output_errors($errors);        
        } else {
            header('Location: activate.php?success');
            exit();
        }

    } else {
        header('Location: index.php');
        exit();
    }

    include 'includes/overall/footer.php'; 
?>

以下给出的电子邮件链接代码: * 'user.php的' *

1 个答案:

答案 0 :(得分:1)

activate函数返回false。确保以正确的方式调用它,并且它按预期工作。