Success message is not showing and url is not redirected to activate.php?success
<p>I'm having a hard time figuring out an error with my PHP User/registration site.
After registration an email with an activation link is sent, and when the link is clicked it successfully activates the account, but it is not showing the success message. </p>

<p>If i copy/paste the activation link in the browser and change a letter in either the email or email-code that is in the link, it will successfully give me all the error messages.</p>

<p>activation link looks like this:</p>

<p><strong><a href="http://website.com/activate.php?email=useremail@website.com&amp;email_code=2631df446b129480abdbf54f08e8c494" rel="nofollow">http://website.com/activate.php?email=useremail@website.com&amp;email_code=2631df446b129480abdbf54f08e8c494</a></strong></p>

<p>This is the code for my activate.php</p>

<pre><code>&lt;?php 
include 'core/init.php';
logged_in_redirect();
include 'includes/overall/header.php';
?&gt;

&lt;?php 
if (isset($_GET['success']) == true &amp;&amp; empty($_GET['success']) == true) {
    ?&gt;
&lt;h3&gt;Thanks, your account has been activated..&lt;/h3&gt;
&lt;p&gt;You're free to log in!&lt;/p&gt;
&lt;?php
    header('Location: activate.php?success');
    exit();
} 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[] = 'Ooops something went wrong, and we couldn\'t find that email adress!';
    } else if (activate($email, $email_code) === false) {
    $errors[] = 'We had problems activating your account';
    } if (empty($errors) === false) {
?&gt;
    &lt;h2&gt;Ooops...&lt;/h2&gt;
&lt;?php
    echo output_errors($errors);
} else {
    header('Location: activate.php?success');
    exit();
}
} else {
header('Location: index.php');
exit();
}
?&gt;

&lt;?php include 'includes/overall/footer.php'; ?&gt;
</code></pre>

<p>Why won't it give me the success message and redirect?</p>

<p>The URL doesn't change from: <a href="http://website.com/activate.php?email=useremail@website.com&amp;email_code=2631df446b129480abdbf54f08e8c494" rel="nofollow">http://website.com/activate.php?email=useremail@website.com&amp;email_code=2631df446b129480abdbf54f08e8c494</a> </p>

<p>to:
website.com/activate.php?success</p>
