Извеждане на текст от дб при регистрация!

SuCcEsS

Registered
Трябва ми следното след като се натисне бутона за регистрация акаунта е създаден и искам да изведа активиращия код как ще стане това? полето в таблицата се казваа uCode а етог го и кода който изпраща като мейл
Код:
 $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 . " но не се получава аз го бях направил но не помня как ;(
 

$syob6tenie = "zdraejte, va6iq kod za registr. e $randcode. Mojete da go vyvedete ot tuk: http://www.lelq.ti.i.4i4o.ti.prawqt.deca.bg/mom4eta/"
if ( mail( $email1, $TheSubject, "$syob6tenie", $headers ) )
 
skatebord каза:

$syob6tenie = "zdraejte, va6iq kod za registr. e $randcode. Mojete da go vyvedete ot tuk: http://www.lelq.ti.i.4i4o.ti.prawqt.deca.bg/mom4eta/"
if ( mail( $email1, $TheSubject, "$syob6tenie", $headers ) )

Какво ще рече това защо е в червено?

Ето как свършва кода и започва текста който показва:
Код:
  if ( mail( $email1, $TheSubject, "", $headers ) ) {

            ?>
	
			АКТИВИРАЩ КОД:  <br> <b>Вашия акаунт е приет за преглед на данните и до 24 часа ще бъде активиран!</b> След като бъде активиран акаунта ви <b>няма</b> да получите уведомителен email!
 
if ( mail( $email1, $TheSubject, "", $headers ) ) {

?>

АКТИВИРАЩ КОД: <? echo $randcode ; ?><br> <b>Вашия акаунт е приет за преглед на данните и до 24 часа ще бъде активиран!</b> След като бъде активиран акаунта ви <b>няма</b> да получите уведомителен email!
 

Back
Горе