[Solved] how to fetch data from mysql database using php [closed]
[ad_1] Here an example code: $headers=”From: [email protected]” . “\r\n”; $mysqli = new mysqli(“localhost”, “user”, “password”, “database”); $output = $mysqli->prepare(“SELECT id FROM table WHERE x=?”); $output->bind_param(“s”, $parameter); $output->execute(); $output->store_result(); $output->bind_result($id); while ($output->fetch()) { mail($to, $subject, $emailcontent, $additionalheader); } $output->close(); Take a look at these links: 1. http://php.net/manual/de/mysqli.quickstart.prepared-statements.php 2. http://us3.php.net/manual/de/book.mail.php 0 [ad_2] solved how to fetch data … Read more