Jump to content

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


zelig
 Share

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");
    
}

Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.