Hello why is it that I cannot include in the link when I concatenate?
here is the code.
$mail->Subject = 'Verification Link'; $mail->Body = 'http://localhost/Mailer/verification.php?code='.$user_verificationCode; $mail->AltBody = 'http://localhost/Mailer/verification.php?code='.$user_verificationCode;
But the $userverifcation is not included in the link even when I concatenate it? Here is the sample link: http://localhost/Mailer/verificationForgot.php?code= Zk8gIT
As you can see it is not included in the link? WHat should I do?
Advertisement
Answer
You have a space in $user_verificationCode
. You should use trim to remove it before append to URL.
$mail->Subject = 'Verification Link'; $mail->Body = 'http://localhost/Mailer/verification.php?code='.trim($user_verificationCode); $mail->AltBody = 'http://localhost/Mailer/verification.php?code='.trim($user_verificationCode);