Jump to content

Sending an e-mail; doesn't display correctly


Altec

Recommended Posts

I have the following code:

$query1 = mysql_query("SELECT `ID` FROM `members` WHERE username = '{$username}' LIMIT 1;");
if ($query1) { $memid = $query1;
// E-mail message
$subject = 'Activation required for Ballistic Designs';
$message = 'Dear '.$username.',\n';
$message .= 'Thank you for registering at Ballistic Designs. Before we can activate your account one last step must be taken to complete your registration.\n\nPlease note - you must complete this last step to become a registered member. You will only need to visit this url once to activate your account.\n\nTo activate your account, please visit this URL:';
$message .= 'http://www.phreakyourgeek.com/activate.php?id='.$memid.'&conf='.$confcode;
mail($email,$subject,$message);
header('Location: index.php?msg=true');
} 

First off, I don't know if I'm getting the member's ID correctly; normally I'd do $_SESSION['member_ID'], but this is the registration script so I haven't set the session yet. Furthermore, the e-mail comes as:

Dear Rawr,\nThank you for registering at Ballistic Designs. Before we can activate your account one last step must be taken to complete your registration.\n\nPlease note - you must complete this last step to become a registered member. You will only need to visit this url once to activate your account.\n\nTo activate your account, please visit this URL:http://www.phreakyourgeek.com/activate.php?id=Resource id #4&conf=W4SCWJP4XDA7MCOP8SYJZZJ4HV89OVOAP7D

In the case above, user "Rawr" has the ID 3 in the database, which means that I'm not getting the member ID correctly. Can anyone help?

Link to comment
Share on other sites

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.