MyBB Community Forums

Full Version: display all emails script blank page. Need help ASAP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to use  script to list all emails in my database on the screen but all im getting is a blank screen.

using the code below.

<?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 />";
}
?>
(2014-11-22, 10:16 PM)sn4g Wrote: [ -> ]I'm trying to use  script to list all emails in my database on the screen but all im getting is a blank screen.

using the code below.


<?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 />";
}
?>

What is the error outputting? Is global.php located in the same directory as the email script?

Put this above 'define("IN_MYBB" , 1)'

ini_set('error_reporting', E_ALL);