Jump to content

Can't figure out why I'm getting a blank screen...


zelig

Recommended Posts

Good morning all!

 

I'm running this function, but for some reason, it's throwing up a blank white screen. I have no idea why.

 

The "echo $query" doesn't return anything, but those fields are all in the table I'm pulling from, so I don't understand what's going on.

 

Any help would be appreciated!

 

Thanks!

 

function attacks() {
    
    $query = doquery("SELECT id, name FROM `attacks` ORDER BY name", "attacks");
echo $query;
    $page = "<b><u>Edit attacks</u></b><br />Click on a attack name to edit it.<br /><br /><table width=\"50%\">\n";
    $count = 1;
    while ($row = mysql_fetch_array($query)) {
        if ($count == 1) { $page .= "<tr><td width=\"8%\" style=\"background-color: #eeeeee;\">".$row["id"]."</td><td style=\"background-color: #eeeeee;\"><a href=\"admin_panel.php?do=editattack:".$row["id"]."\">".$row["name"]."</a></td></tr>\n"; $count = 2; }
        else { $page .= "<tr><td width=\"8%\" style=\"background-color: #ffffff;\">".$row["id"]."</td><td style=\"background-color: #ffffff;\"><a href=\"admin_panel.php?do=editattack:".$row["id"]."\">".$row["name"]."</a></td></tr>\n"; $count = 1; }
    }
    if (mysql_num_rows($query) == 0) { $page .= "<tr><td width=\"8%\" style=\"background-color: #eeeeee;\">No attacks found.</td></tr>\n"; }
    $page .= "</table>";
    admindisplay($page, "Edit attacks");
    
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.