多个查询发送有关特殊电子邮件ID的电子邮件

时间:2019-05-13 08:00:39

标签: php html

多个查询发送有关特殊电子邮件ID的电子邮件。我正在使用PHP 7.2和xampp服务器。我有一个表名是“查询”和字段名 'id,名称,电子邮件,电话,主题,按摩,已发布和特殊电子邮件ID info@amit.com。但是PHP脚本无法正常工作,所以请帮助我...

表“查询”

id  |  name | emai       | phone    | subject | massage | check all(i am using check out bottom) 
1   | Amit  |am@gmail.com|8989898989| software|need     | check me
2   | Ajet  |ak@gmail.com|8989877676| software|need     | check me
3   | sona  |ap@gmail.com|8989565989| website |need     | check me
4   | mona  |tt@gmail.com|8988787877| website |need     | check me
5   | moni  |ck@gmail.com|8989767676| S-ERP   |need     | check me
6   | Amit  |rt@gmail.com|8989897676| S-ERP   |need     | check me

点击底部的“发送查询”以查看ID 1,3,4

在此处打开HTML模型打开代码

<div id="myModal" class="modal fade" role="dialog">

  <div class="modal-dialog">

    <!-- Modal content-->
  <form action="">

    <div class="modal-content">

      <div class="modal-header">

        <button type="button" class="close" data-dismiss="modal">&times;</button>

        <h4 class="modal-title">Modal Header</h4>

      </div>

      <div class="modal-body">

        <input type="email" class="form-control" id="email">

        <input type="text" name="msg" class="form-control">

      </div>

      <div class="modal-footer">

        <button type="submit" name="send" class="btn btn-default" data-dismiss="modal">Close</button>

      </div>


    </div>
   </form>

  </div>

</div>

事件PHP脚本

    <?php

       if (isset($_POST["send"])) 
        {
           $to=$_POST[email];
           $subject=$_POST[subject];
           $phone=$_POST[phone];
           $name=$_POST[name];
           $massage=$_POST[massage];


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

               while ($rows=mysqli_fetch_array($sql)) 

                    { ?>
                        <div style="padding:10px;background:#ccc; margin-bottom: 1%;">
                            <p>name :<?php echo $rows['name'];?>
                               email :<?php echo $rows['email'];?>
                               phone :<?php echo $rows['phone'];?>                             
                               subject :<?php echo $rows['subject'];?>
                               massage :<?php echo $rows['massage'];?>
                            </p>

                        </div>

                      <?php } 

        mail (to,$subject,phone,name,massage,????);

        }

    }  
?>

我想通过电子邮件ID info@amit.com看到这种类型的结果

但是php无法正常工作,先生,请帮助我。  一个查询已到。

  name :Amit ,email:am@gmail.com,phone:8989898989,subject:software,massage:need

  name :sona ,email:ap@gmail.com, phone:8989565989,subject:website,massage:need

  name : mona  ,email:tt@gmail.com,phone:8989767676,subject:S-ERP,massage:need

0 个答案:

没有答案