Altec Posted November 23, 2007 Share Posted November 23, 2007 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 https://forums.phpfreaks.com/topic/78601-sending-an-e-mail-doesnt-display-correctly/ Share on other sites More sharing options...
koen Posted November 23, 2007 Share Posted November 23, 2007 A mysql query return a resource. You'll want to handle that resource with a function like $memid = mysql_result($query, 0) or something like it. Link to comment https://forums.phpfreaks.com/topic/78601-sending-an-e-mail-doesnt-display-correctly/#findComment-397755 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.