I'm at the final part of my code, the email verification. However, the email don't seem to be sent correctly. For the sake of spam, I'll replace my email with _EMAIL_.
$hash = genRandomString();
$link = 'http://www.website.com/verify.php?email=' . $email . '&hash=' . $hash;
$message = 'Please confirm your email address by click this following link, or copy and pasting it into your web browser.'
. $link;
mail($email, 'Account verification for website.com', $message);
All the data is going correctly into the database (No incorrect variables), but the email comes though something like this:
Please confirm your email address by click this following link, or copy and pasting it into your web browser.
_EMAIL_&hash=0uhcoawgi3qsek8l7rjoheo'>http://www.website.com/verify.php?email=_EMAIL_&hash=0uhcoawgi3qsek8l7rjoheo
I'm assuming this is something I'm doing wrong, but I can't spot it after various pieces of troubleshooting.