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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.