Forum Moderators: open
define('DB_SERVER','localhost');
define('DB_NAME','(database)');
define('DB_USER','(username)');
define('DB_PASSWORD','(password)');
$dbh=mysql_connect (DB_SERVER, DB_USER, DB_PASSWORD) or die ('System is down. We apologize for the inconvenience. Please try again soon.' . mysql_error());
mysql_select_db (DB_NAME);
$query="SELECT DISTINCT(username) FROM users";
$result=mysql_query($query);
if (!$result = mysql_query($query))
{
// There was an error in the sql statement
print "there was an error in the sql statement, ".mysql_error()."<br><b>$query</b>";
exit;
}
while ($row = mysql_fetch_array($result)) {
extract($row);
https://example.com/sql.php?server=1&db=your_database&table=your_table&pos=0&token=some_token