SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast Hexlo's Avatar
    Join Date
    Feb 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table not outputting

    Hi,
    I am using the code below and the table doesn't seem to be outputting anything such as the remove, just the name, email, gender and ban. Anyone know why it's not working?
    Thanks
    Steven
    PHP Code:
    $result mysql_query($query) or die(mysql_error());
            echo 
    '<table width="1000" border="0.5">
                  <tr>
                    <td width="93">Username:</td>
                    <td>Email:</td>
                    <td>Gender:</td>
                    <td>Banned:</td>
                    <td>Edit:</td>
                    <td>Remove:</td>
                    <td>Ban:</td>
                    <td>Make Admin: </td>
                  </tr>'
    ;
            while(
    $row mysql_fetch_array($result))
            {
            
                echo 
    '
                  <tr>
                    <td width="93">'
    $row['username'].' </td>
                    <td width="93">'
    $row['email'].' </td>
                    <td width="93">'
    $row['gender'].' </td>
                    '
    ; if ($row['ban'] == 1)

                        {
                            echo 
    '<td width="93"><a href="index.php?ACT=03&id='.$row['id'].'">Unban</a></td>';
                        } else 
                        {
                            echo 
    '<td width="93"><a href="index.php?ACT=03&id='.$row['id'].'">Ban</a></td>';
                        } ;
    '
                    <td width="93"></td>
                    <td width="93"><a href="index.php?ACT=04&id='
    .$row['id'].'">Remove</a></td>
                    <td width="93">&nbsp;</td>
                    <td width="137">123</td>
                  </tr>'
    ;
                
            }
            echo 
    '</table>'

  2. #2
    SitePoint Evangelist mrwooster's Avatar
    Join Date
    Jan 2006
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is the query and are you sure that the column names are correct?

  3. #3
    SitePoint Enthusiast Hexlo's Avatar
    Join Date
    Feb 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The query stuff is all working fine and I can bann and unban it's just in the <td> under them, Nothing will output so I can't link the delete function.

  4. #4
    Non-Member
    Join Date
    Mar 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think your column name creating a little bit problem .so lets cheack it out first


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •