Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set("display_errors", 1);
- $db_host = "localhost";
- $db_user = "***";
- $db_password = "***";
- $db_name_sms = "Mailing";
- $con_sms = mysqli_connect($db_host, $db_user, $db_password, $db_name_sms);
- if($con_sms){
- echo "connesso";
- }else{
- echo "non connesso";
- }
- if (!$p_file = fopen("1.csv","r")) {
- echo "Spiacente, non posso aprire il file 1.txt";
- } else {
- while(!feof($p_file))
- {
- $linea = fgets($p_file, 255);
- $query = "DELETE FROM MailingList WHERE Email='$linea'";
- if($con_sms->query($query)){
- echo "Mail ".$linea." cancellata <br />";
- echo $query."<br />";
- }else{
- echo "Mail ".$linea." non cancellata";
- }
- }
- fclose($p_file);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement