The Arcive of vBulletin Modifications Site. |
|
Need help with email.php Details »»
|
|||||||||||||||||||||||||
In admin/email.php you can generate a mailing list but I would also like for a text file to be written at the same time it is creating the list.
The fetch array is: $users=$DB_site->query("SELECT email FROM user WHERE $condition AND adminemail=1"); while ($user=$DB_site->fetch_array($users)) { echo $user[email].$septext; flush(); } } What could I put in here so that it captures all the $user[email] and writes it to a text file with today's date? Thanks, Parker Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
PHP Code:
writetofile() is a function in adminfunctions.php, which I have never used before. I just noticed while browsing the file. Another possible way could be: PHP Code:
|
|
#3
|
|||
|
|||
|
Sparkz:
The second example works great. The only problem is that the line breaks are put into the .txt file as <br>. What would you recommend using to put a line break between each email address in the resultant .txt file? Parker |
|
#4
|
||||
|
||||
|
PHP Code:
|
|
#5
|
|||
|
|||
|
Sparkz:
Thanks. That is so weird because I had tried adding the /n but it didn't work. Now it does though. Thanks again. Parker |
|
#6
|
||||
|
||||
|
Well, /n wouldn't work, but \n would
|
![]() |
|
|