forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: KOREntertainment on November 27, 2010, 02:13:14 am

Title: getting users emails
Post by: KOREntertainment on November 27, 2010, 02:13:14 am
I have a script for my 2009 gallery that extracted my members emails, I would like one for my 2010 gallery.  Thanks in advance.

http://korentertainment.net/gallery2/index.html (http://korentertainment.net/gallery2/index.html)
Title: Re: getting users emails
Post by: Αndré on November 27, 2010, 08:18:54 am
Attach that script, so we don't have to start from scratch.
Title: Re: getting users emails
Post by: KOREntertainment on November 27, 2010, 09:23:21 am
<?php
define('IN_COPPERMINE', 1);
require 'include/init.inc.php';

$test = CPG_db_query("SELECT DISTINCT(user_email) FROM {$CONFIG['TABLE_USERS']} WHERE user_email <> ''");
while ($row = mysql_fetch_assoc($test))
echo $row['user_email'] . "<br />";
?>
Title: Re: getting users emails
Post by: Αndré on November 27, 2010, 09:24:21 am
What exactly doesn't work when you copy that script to your new gallery?
Title: Re: getting users emails
Post by: KOREntertainment on November 27, 2010, 09:25:54 am
For some strange reason after all this time, I ran the script and it actually worked.
Title: Re: getting users emails
Post by: KOREntertainment on November 27, 2010, 09:29:51 am
What exactly doesn't work when you copy that script to your new gallery?
I use to get an error message, I don't recall what it said, it's been a while but it's working now.  smh thanks.
Title: Re: getting users emails
Post by: Laicodc on December 20, 2010, 08:36:04 pm
How do you add that script so you can download the user emails?  Which file and what location. Thanks in advance.
Title: Re: getting users emails
Post by: Αndré on December 20, 2010, 08:55:30 pm
Copy the code to some text file and rename it to whatever.php. Then upload it to your gallery root and open it with your web browser.