Send Multiple Email with Their Multiple Detail

index.php file

 <form  action="emailsendtoall.php" method="post" enctype="multipart/form-data">

                   

                   

                     

                      
<?php
include 'db.php';
$sql = mysql_query("select * from tablename");                       // here we are show all email form table , on which we want to send emails
while($result = mysql_fetch_array($sql))
{
?>
<?php echo $result['email']; ?>&nbsp;&nbsp;,&nbsp;&nbsp;
<?php
}
?>


                   

                      <input type = "submit"  class = "btn btn-primary btn-sm" value = "Send"  >

                 

                  </form>

send-email.php file

<?php
require 'db.php';   // database connection file
$sql = mysql_query("select * from  tablename");    // select All Email From Table Name
while($result = mysql_fetch_array($sql))
{

$email = $result['email'];

if($email)
{

$get =mysql_query("select * from member where email = '$email'");
$getr = mysql_fetch_array($get);
$emailuser = $getr['email'];                               // user email
$password = $getr['password'];                      // user password   or  // you can fetch multiple detail which you want to send  
$subject = 'Multiple Email With Their Multiple Details';

$message = "<html><head></head>

<body>
<p>Welcome Message Your Email is  ".$emailuser."<br>


And password is ".$password."<br>


(This is an auto-generated email. Please do not reply. Any further queries will be addressed at aoqr2019@gmail.com)


</body></html>";

 

mail($emailuser, $subject, $message);
?>
<script>
alert("Registration Details Send to All Member");
window.location='index.php';
</script>
<?php

}
else
{
?>
<script>
alert("None Email Remain to send");
window.location='index.php';
</script>
<?php

}

}
?>



Explore Our YouTube Tutorials

Dive into our YouTube tutorials to access high-quality learning content on web development, design, and technology. Each video is crafted to provide clear guidance and hands-on knowledge for skill development.

 


Upgrade Your Skills with Our Courses

Choose the right course and start building your future with practical skills.

Web Development

Learn HTML, CSS, JavaScript, and PHP to build modern, responsive websites and real-world projects.

Enroll Now See Full Details

Breadboard Learning

Understand electronics basics with hands-on breadboard projects and circuit building techniques.

Enroll Now See Full Details

AI Training

Step into AI with real-world applications, automation tools, and smart development techniques.

Enroll Now See Full Details