failed to connect to database server, unknown server name"; exit; } if (empty($dbusername)){ echo "
failed to connect to database server, unknown database user name
"; exit; } if (empty($dbpassword)){ echo "
failed to connect to database server, unknown database user name password
"; exit; } if (empty($dbname)){ echo "
failed to connect to database server, unknown database name
"; exit; } if (empty($dbtable)){ echo "
failed to connect to database server, unknown database table name
"; exit; } if (empty($dbusertable)){ echo "
failed to connect to database server, unknown user database table
"; exit; } $dbconnection = connect_to_database($dbserver,$dbusername,$dbpassword,$dbname); if (strpos(strtolower($dbconnection),"fail") !== false){ echo "failed, " . mysql_error(); exit; } $query = mysql_query("SELECT name FROM " . trim($dbusertable) . " WHERE admin != 0"); if ($query){ $results = "success"; } else { echo "failed, " . mysql_error(); } while ($row = mysql_fetch_array($query)){ $query2 = mysql_query("SELECT * FROM " . trim($dbtable) . " WHERE user_name = '" . $row['name'] . "' AND end_time is NULL"); while ($row2 = mysql_fetch_array($query2)){ echo ""; } } mysql_close($dbconnection); ?>
" . $row2['user_name'] . "