通过特殊用户发送电子邮件多个记录

时间:2019-05-08 11:28:56

标签: php html

我想向特殊用户发送多个电子邮件记录。但无法使用电子邮件。我正在使用电子邮件格式,而不是HTML错误。和PHP,请帮助我。.

PHP脚本 t

<?php

       if (isset($_POST["submit"])) 
        {
           $to=$_POST[email];
           $subject="One enquiry has been come!";

            if (count($_POST["ids"]) > 0 ) 
             {
               $all = implode(",", $_POST["ids"]);
               $sql =mysqli_query($con,"select * FROM tblusers WHERE id in ($all)");

               while ($rows=mysqli_fetch_array($sql)) 

                    { ?>
                        <div style="padding:10px;background:#ccc; margin-bottom: 1%;">
                            <p>fullname :<?php echo $rows['FullName'];?> 
                               Education :<?php echo $rows['Education'];?>
                               postingDate :<?php echo $rows['postingDate'];?>
                            </p>

                        </div>

                      <?php } 

        mail (to,$subject,????);

        }

    }  
?>

1 个答案:

答案 0 :(得分:0)

**I Want to send Email on special user multiple records. but the loop is not converted in to string any idea so, please help me...**

  <?php

       if (isset($_POST["submit"])) 
        {
           $to=$_POST[email];
           $subject="One enquiry has been come!";

            if (count($_POST["ids"]) > 0 ) 
             {
               $all = implode(",", $_POST["ids"]);
               $sql =mysqli_query($con,"select * FROM tblusers WHERE id in ($all)");

               while ($rows=mysqli_fetch_array($sql)) 

                    { ?>
                        <div style="padding:10px;background:#ccc; margin-bottom: 1%;">
                            <p>fullname :<?php echo $rows['FullName'];?> 
                               Education :<?php echo $rows['Education'];?>
                               postingDate :<?php echo $rows['postingDate'];?>
                            </p>

                        </div>

                      <?php } 

        mail (to,$subject,????);

        }

    }  
?>