Народ, уповаю только на вас. Есть код, в котором надо добавить строчку чтобы форма регистрации отправлялась не только пользователю но и админу, что только не пробовал, отправляет на одно мыло. В нем есть строка: mail($_POST['aemail'], "Welcome New Affiliate!", $aemailbody, "From:".$emailinfo."\nReply-To:".$emailinfo."\n"); она отправляет регистрационные данные пользователю на его мыло, пробовал добавить ниже строчку mail("admin@site.ru", "Welcome New Affiliate!", $aemailbody, "From:".$emailinfo."\nReply-To:".$emailinfo."\n"); И не чего не происходит. Ставишь ее выше над основной строкой, тогда письмо отсылается только на адрес admin@site.ru пользователю уже ничего не отсылается. Помогите решить проблему!! Вот сам код: <? session_start(); include "../affconfig.php"; include "./lang/$language"; include "./countries.php"; $errorMsg = ''; if($_POST['commited'] == 'yes') { // form was sent mysql_connect($server, $db_user, $db_pass) or die ("Database CONNECT Error (line 8)"); if($_POST['ausername'] == '') $errorMsg .= AFF_SI_UNAMEMISSING.'<br>'; // check if user doesnt exist already $userid = preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['ausername']); // protect against sql injection $chk_user = mysql_db_query($database, "select refid from affiliates where refid='$userid'"); if(mysql_num_rows($chk_user) > 0) { $errorMsg .= AFF_SI_USEREXISTS.'<br>'; $_POST['ausername'] = ''; } if($_POST['apassword'] == '') $errorMsg .= AFF_SI_PWDMISSING.'<br>'; if($_POST['aemail'] == '') $errorMsg .= AFF_SI_EMAILMISSING.'<br>'; if($errorMsg == '') { // save and send notification email $aemailbody = "Dear ".$_POST['afirstname'].",\n\nThank you for signing up to our affiliate program.\nYour account details are below:\n\n" ."Username: ".$_POST['ausername']."\nPassword: ".$_POST['apassword']."\n\n" ."You can log into your account and view your 'real-time' statistics by going to:\n" ."http://".$domain."/user/index.php\n\n" ."Thank you once again, and we wish you luck with your profit making!\n\n\n" ."Affiliate Manager\n" .$_POST['emailinfo']."\n\n\n\n"; mysql_db_query($database, "INSERT INTO affiliates VALUES ('".$_POST['ausername']."', '".$_POST['apassword']."', '".$_POST['acompany']."', '".$_POST['atitle']."', '".$_POST['afirstname']."', '".$_POST['alastname']."', '".$_POST['awebsite']."', '".$_POST['aemail']."', '".$_POST['apayable']."', '".$_POST['astreet']."', '".$_POST['atown']."', '".$_POST['acounty']."', '".$_POST['apostcode']."', '".$_POST['acountry']."', '".$_POST['aphone']."', '".$_POST['afax']."', '".$_POST['adate']."')") or die(mysql_error()); include "thankyou.php"; mail($_POST['aemail'], "Welcome New Affiliate!", $aemailbody, "From:".$emailinfo."\nReply-To:".$emailinfo."\n"); exit; } } include "header.php"; ?> <p align=center><br> <p align=center><font face=Arial size=2 color=#000000><b><font size=3>РЕГРРЎРўР РђР¦РРЇ</font></b></font></p> <? if($errorMsg != '') echo "<p align=center><font color=#ff0000>$errorMsg</font></p>"; ?> <form name="signupform" method="post" action="signup.php"> <table border="0" cellspacing="3" cellpadding="1"> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Обращение:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <select name="atitle"> <option value="Мистер">Mr</option> <option value="РњРёСЃСЃРёСЃ">Mrs</option> <option value="РњРёСЃСЃ">Miss</option> <option value="Господин">Ms</option> <option value="Госпожа">Dr</option> </select> </font></b></td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">РРјСЏ:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="afirstname" size=20 value="<?=$_POST['afirstname']?>"> </font></b></td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Фамилия:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="alastname" size=20 value="<?=$_POST['alastname']?>"> </font></b></td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Компания:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="acompany" size=20 value="<?=$_POST['acompany']?>"> </font></b></td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Website Address:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="awebsite" size=20 value="<?=$_POST['awebsite']?>"> </font></b></td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">E-mail: *</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="aemail" size=20 value="<?=$_POST['aemail']?>"> </font></b></td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Город:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="astreet" size=20 value="<?=$_POST['astreet']?>"> </font></b></td> </tr> <tr> <td><span lang="en-us"><b> <font face="Verdana, Arial, Helvetica, sans-serif" size="2">WMID</font></b></span><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="atown" size=12 value="<?=$_POST['atown']?>"> </font></b></td> </tr> <tr> <td><b><span lang="en-us"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2">R</font></span><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> кошелек</font><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="acounty" size=13 value="<?=$_POST['acounty']?>"> </font></b></td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Рндекс:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="apostcode" size=20 value="<?=$_POST['apostcode']?>"> </font></b></td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Страна:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <select name=acountry class=dropdown value="UK" > <? foreach($GLOBALS['countries'] as $key => $country) print '<option value="'.$key.'" '.($_POST['acountry'] == $key ? 'selected' : '').'>'.$country.'</option>'."\n"; ?> </select> </font></b></td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Телефон:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="aphone" size=20 value="<?=$_POST['aphone']?>"> </font></b></td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Факс:</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="afax" size=20 value="<?=$_POST['afax']?>"> </font></b></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Введите ЛОГРРќ: *</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="text" name="ausername" maxlength="12" size=20 value="<?=$_POST['ausername']?>"> </font></b></td> </tr> <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Введите ПАРОЛЬ: *</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <input type="password" name="apassword" size="20" maxlength="12" > </font></b></td> </tr> <tr> <td colspan=2> <p> </p> </td> </tr> <tr> <td colspan="2"> <div align="center"> <input type=hidden name=commited value=yes> <input type="submit" value="Зарегистрироваться" name="submit" > </div> </td> </tr> </table> </form> <br>