Jump to content

Recommended Posts

Hi the below is part my code which generates an email to the user asking them to authenticate, all works fine however I want to add the new user name to the email, one for politeness but more importantly so the user has a email with the login id.

I have been trying to edit my code and insert the value of the variable $var_username within the message but totally no luck figuring it out, any help appreciated.

the bit of code is below 

 

$var_username = $S_POST['username'];
	$message = '<p>Hello</p>' . "$var_username" . '<p>Please click the following link to activate your account : <a href="' . $var_username . $activate_link . '">' . $activate_link . '</a></p>';

 

Link to comment
https://forums.phpfreaks.com/topic/310591-insert-username-into-email/
Share on other sites

U should use $_POST, try the below code:

$var_username = $_POST['username'];
$message = '<p>Hello</p>' . $var_username . '<p>Please click the following link to activate your account : <a href="' . $var_username . $activate_link . '">' . $activate_link . '</a></p>';

 

On 4/16/2020 at 9:17 AM, TrueMember said:

U should use $_POST, try the below code:


$var_username = $_POST['username'];
$message = '<p>Hello</p>' . $var_username . '<p>Please click the following link to activate your account : <a href="' . $var_username . $activate_link . '">' . $activate_link . '</a></p>';

 

You was right use $_POST .. below works fine 

$message = '<p>Thanks for creating an account your username is - </p>' . $_POST['username'] . '<p>Please click the following link to activate your account : <a href="' . $activate_link . '">' . $activate_link . '</a></p>';

Thank you 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.