View Single Post
Old 10-01-2021, 07:54 PM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,072
I would do it inside the if checking results from the query.

if(mysqli_query($link, $sql)){
echo "Records added successfully.";

// ...............Do the email shit right here................

$emailsubj="subject of my email";

$emailsendaddress="[email protected]";

$emailaddy2use="address I am sending to";

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$headers .="From: " . $emailsendaddress . "\r\n";

mail ( $emailaddy2use, $emailsubj, $emailmessage, $headers);

}
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote