Трябва ми следното след като се натисне бутона за регистрация акаунта е създаден и искам да изведа активиращия код как ще стане това? полето в таблицата се казваа uCode а етог го и кода който изпраща като мейл
Пробвах със REG-CODE: " . $randcode . " но не се получава аз го бях направил но не помня как ;(
Код:
$TheSender = $SETTINGS['game_email'];
$TheRecipient = $email1;
$TheSubject = $SETTINGS['gamename'] . ": Validation Code";
$TheText = "<font face='Tahoma' size='1'>Dear " . $username . ",<br>Welcome to " . $SETTINGS['gamename'] . ". <BR> You will need to type in the following confirmation code on the website, before you can play " . $SETTINGS['gamename'] . ".<br> <br> REG-CODE: " . $randcode . "<br> <br> Or you can click the following link:<br> <a href='" . $YourRegLink . "'>" . $YourRegLink . "</a><BR><BR>";
$TheText = $TheText . "Or, you could copy and paste the following url into your browser:<BR>" . $YourRegLink . "</font>";
$TheText = $TheText . "<BR><BR>";
$TheText = $TheText . "Any replies to this email will be automatically deleted.";
$TheText2 = "Dear " . $username . ",\r\nWelcome to " . $SETTINGS['gamename'] . ". \r\n You will need to type in the following confirmation code on the website, before you can play " . $SETTINGS['gamename'] . ".\r\n\r\n REG-CODE: " . $randcode . "\r\n \r\n";
$TheText2 = $TheText . "Or, you could copy and paste the following url into your browser:\r\n" . $YourRegLink;
$TheText2 = $TheText . "\r\n\r\n";
$TheText2 = $TheText . "Any replies to this email will be automatically deleted.";
$headers = "From: $TheSender\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$boundary = uniqid( "hbsignup" );
$headers .= "Content-Type: multipart/alternative" . "; boundary = $boundary\r\n\r\n";
$headers .= "$TheText2\r\n\r\n";
$headers .= "--$boundary\r\n" . "Content-Type: text/plain; charset=windows-1251\r\n" . "Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split( base64_encode( $TheText2 ) );
$headers .= "--$boundary\r\n" . "Content-Type: text/html; charset=windows-1251\r\n" . "Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split( base64_encode( $TheText ) );
if ( mail( $email1, $TheSubject, "", $headers ) )
Пробвах със REG-CODE: " . $randcode . " но не се получава аз го бях направил но не помня как ;(