index.php
getdata.php
index.php
getdata.php
<?php
<script>
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']; ?> ,
<?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
}
}
?>
<script>
function random(){
var item = ["Rock","Paper","Sessior"];
var rand = item[Math.floor(Math.random()*item.length)];
return rand;
}
function r(){
var rock = document.getElementById("r").value;
var computerinput = random();
if(rock=="Rock" && computerinput=="Rock")
{
document.getElementById("result").innerHTML="<b style='color:steelblue'>Match Tie</b>"+"Computer Input is <b style='color:red;'>"+computerinput+"</b> User Input is <b style='color:green;'>"+rock+"</b>";
}
else if(rock=="Rock" && computerinput=="Paper")
{
document.getElementById("result").innerHTML="<b style='color:steelblue'>Computer Win!</b>"+"Computer Input is <b style='color:red;'>"+computerinput+"</b> User Input is <b style='color:green;'>"+rock+"</b>";
}
else if(rock=="Rock" && computerinput=="Sessior")
{
document.getElementById("result").innerHTML="<b style='color:steelblue'>User Win!</b>"+"Computer Input is <b style='color:red;'>"+computerinput+"</b> User Input is <b style='color:green;'>"+rock+"</b>";
}
}
function p(){
var paper = document.getElementById("p").value;
var computerinput = random();
if(paper=="Paper" && computerinput=="Rock")
{
document.getElementById("result").innerHTML="<b style='color:steelblue'>Computer Win!</b>"+"Computer Input is <b style='color:red;'>"+computerinput+"</b> User Input is <b style='color:green;'>"+paper+"</b>";
}
else if(paper=="Paper" && computerinput=="Paper")
{
document.getElementById("result").innerHTML="<b style='color:steelblue'>Match Tie!</b>"+"Computer Input is <b style='color:red;'>"+computerinput+"</b> User Input is <b style='color:green;'>"+paper+"</b>";
}
else if(paper=="Paper" && computerinput=="Sessior")
{
document.getElementById("result").innerHTML="<b style='color:steelblue'>Computer Win!</b>"+"Computer Input is <b style='color:red;'>"+computerinput+"</b> User Input is <b style='color:green;'>"+paper+"</b>";
}
}
function s(){
var sessior = document.getElementById("s").value;
var computerinput = random();
if(sessior=="Sessior" && computerinput=="Rock")
{
document.getElementById("result").innerHTML="<b style='color:steelblue'>COmputer Win!</b>"+"Computer Input is <b style='color:red;'>"+computerinput+"</b> User Input is <b style='color:green;'>"+sessior+"</b>";
}
else if(sessior=="Sessior" && computerinput=="Paper")
{
document.getElementById("result").innerHTML="<b style='color:steelblue'>User Win!</b>"+"Computer Input is <b style='color:red;'>"+computerinput+"</b> User Input is <b style='color:green;'>"+sessior+"</b>";
}
else if(sessior=="Sessior" && computerinput=="Sessior")
{
document.getElementById("result").innerHTML="<b style='color:steelblue'>Match Tie!</b>"+"Computer Input is <b style='color:red;'>"+computerinput+"</b> User Input is <b style='color:green;'>"+sessior+"</b>";
}
}
</script>
<center>
<input type="button" id="r" onclick="r()" value="Rock">
<input type="button" id="p" onclick="p()" value="Paper">
<input type="button" id="s" onclick="s()" value="Scissor">
<br>
<br>
<div id="result"></div>
</center>
See video - Go to video Code : # variable x = 7 y = 5 z = 9 print ( x + y + z ) #assign multiple variable x , y , z = "hello...