Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Exporting email addresses.
#1
Not Solved
The systems mass email function isn't strong enough for me to do a newsletter. Is there a way to export all my users email addresses so I can use a newsletter program?
#2
Not Solved
Create a php file in your root directory with these contents:
<?php
define("IN_MYBB",1);
include("global.php");
$result = $db->query("SELECT * FROM ".TABLE_PREFIX."users")

while ($row = $db->fetch_array($result, MYSQLI_NUM)) {
echo $row['email']."<br />";
}
?>

Excecute it and it should echo all email addresses.
-Paul H.

Cogisne lingua latina?
#3
Not Solved
(2011-10-07, 12:37 AM)Paul H. Wrote: Create a php file in your root directory with these contents:
<?php
define("IN_MYBB",1);
include("global.php");
$result = $db->query("SELECT * FROM ".TABLE_PREFIX."users")

while ($row = $db->fetch_array($result, MYSQLI_NUM)) {
echo $row['email']."<br />";
}
?>

Excecute it and it should echo all email addresses.

Parse error: syntax error, unexpected T_WHILE in /home/bf4br419/public_html/forum/email.php on line 6
[Image: 468x60_bf4brasil_site_zpsd7eefd7f.png]
#4
Not Solved
^ add a semicolon at end of line 4 , that is after $result = $db->query("SELECT * FROM ".TABLE_PREFIX."users")
#5
Not Solved
(2013-08-01, 08:12 AM).m. Wrote: ^ add a semicolon at end of line 4 (after $result = $db->query("SELECT * FROM ".TABLE_PREFIX."users"))



<?php
define("IN_MYBB",1);
include("global.php");
$result = $db->query("SELECT * FROM ".TABLE_PREFIX."users"))

while ($row = $db->fetch_array($result, MYSQLI_NUM)) {
echo $row['email']."<br />";
}
?>


Like this?



Another error

Parse error: syntax error, unexpected ')' in /home/bf4br419/public_html/forum/email.php on line 4
[Image: 468x60_bf4brasil_site_zpsd7eefd7f.png]
#6
Not Solved
^
<?php
define("IN_MYBB",1);
include("global.php");
$result = $db->query("SELECT * FROM ".TABLE_PREFIX."users");

while ($row = $db->fetch_array($result, MYSQLI_NUM)) {
echo $row['email']."<br />";
}
?>
#7
Not Solved
I copy and create the file but it's white page, it's normal?
#8
Not Solved
oh! you can use code like below
<?php
define("IN_MYBB",1);
include("global.php");
$result = $db->query("SELECT * FROM ".TABLE_PREFIX."users");
while ($row = $db->fetch_array($result)) {
echo $row['email']."<br />";
}
?>
#9
Not Solved
just replace it?
#10
Not Solved
^ yes. you can use that code in a php file, upload it to your MyBB files server (where you have global.php file) & execute it


Forum Jump:


Users browsing this thread: 1 Guest(s)