This question already has an answer here:
I want to send an email that lets you reset your password on our webshop. Because we needed to implement some type of security feature. Everytime you request to get your password changed we update a token in our database. This token plus your email will need to be sent to you in form of a clickable link.
I tried using http://localhost/wwi/view/pw_reset.php?token=echo$token&email=echo$email with the proper php tags. But the result I get is: http://localhost/wwi/view/pw_reset.php?token=echo$token&email=echo$email. And not http://localhost/wwi/view/pw_reset.php?token=1&email=2. I believe this happens because I want the link to be in a variable itself like $body = href='http://localhost/wwi/view/pw_reset.php?token=echo $token&email=echo $email' again with the proper html and php tags
Does anyone know how to add the variables to the link?
<?php
$token = 1;
$email = 2;
$body = '
<h1>Wachtwoord wijzigen</h1>
<body>
<p>Druk op de link hieronder om uw wachtwoord te wijzigen.</p><br>
<a href="http://localhost/wwi/view/pw_reset.php?token=<?php echo $token?>&email=<?php echo $email?>">Klik hier</a>
';