Hi there,
I am trying to write a script that will get all data from mysql dtabase where user_actived = 0.
I then want my script to send an email to those people.
The problem is when I echo what it has returned i get something like this:
Quote:
somebody@somehost.comsomebodyelse@thishost.co.uk
How would i seperate the email adddresses and then mail an email to each of them.
Thanks
Noisyscanner
<?php mysql_connect("localhost", "myusername", "mypassword") or die(mysql_error()); mysql_select_db("mydatabase") or die(mysql_error()); $select_game = mysql_query("SELECT * FROM users WHERE user_activated = '0'"); while($row = mysql_fetch_array( $select_game )) { echo($row['user_email']); $message = "Thank you for registering an account with Universalgames.\n You have not yet activated your account, so you will not be able to log in to Universalgames.\n Please activate it by clicking below: http://mysite.com/activate.php _____________________________________________ This is an automated response. PLEASE DO NOT REPLY. ";
It should have already been working. As the emails were different each time the mail function was called. If its not working then there is something wrong with your server.