Multiple enquiry sends an email on special email id .i am using PHP 7.2 and xampp server. i have one table name is "Enquiry" and field name 'id,name,email,phone,subject,massage,posted, and special email id [email protected] but PHP script is not working so please help me...

Table 'Enquiry'

id  |  name | emai       | phone    | subject | massage | check all(i am using check out bottom) 
1   | Amit  |[email protected]|8989898989| software|need     | check me
2   | Ajet  |[email protected]|8989877676| software|need     | check me
3   | sona  |[email protected]|8989565989| website |need     | check me
4   | mona  |[email protected]|8988787877| website |need     | check me
5   | moni  |[email protected]|8989767676| S-ERP   |need     | check me
6   | Amit  |[email protected]|8989897676| S-ERP   |need     | check me

click bottom 'Send Enquiry' check out id 1,3,4

open HTML model open code here

<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>

event PHP script

    <?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,????);

        }

    }  
?>

I want to this type of result on email id [email protected]

but php is not working so please help me, sir. One enquiry has been come.

  name :Amit ,email:[email protected],phone:8989898989,subject:software,massage:need

  name :sona ,email:[email protected], phone:8989565989,subject:website,massage:need

  name : mona  ,email:[email protected],phone:8989767676,subject:S-ERP,massage:need

0 Answers