Show all registered users...

Discussion in 'PHP' started by .KOA, Feb 18, 2008.

  1. #1
    Sup? im making a website & im completely stuck LOL.. im not much of a coder well im not really at all more of a designer.. anyways back on point.. i cant figure out how to show all of my registered users in tables on my admin page, all the rest im thinking about doing to the page is simple for me i just wanna show all usernames in my 'users' table.
    Thank you very much.
    Jay ~
     
    .KOA, Feb 18, 2008 IP
  2. brearley147

    brearley147 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Place this at the top
    $username=$_SESSION['username'];
    Code (markup):
    Then this is for the users.

    <?php
    	$plist= mysql_query("select * from `users` order by `id`");
    	while ($top = mysql_fetch_array($plist)) {
    		print "<tr><td><a href=profile.php?viewuser=$top[username]>$top[username]</a></td>;
    	}
    	?>
    
    Code (markup):
     
    brearley147, Feb 18, 2008 IP
  3. .KOA

    .KOA Peon

    Messages:
    61
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ty for the speedy reply, but it doesnt seem to work. the error might be a simple one i dunno..
    here it is

    Parse error: syntax error, unexpected $end in /home/krzownz/public_html/site_management/edit_user.php on line 14

    Heres the code:
    <?
    session_start();
    
    include "connect/db.php";
    
    include "connect/functions.php";
    
    $username=$_SESSION['username'];
    
    $plist= mysql_query("select * from `users` order by `id`");
    while ($top = mysql_fetch_array($plist)) {
    print "<tr><td><a href=profile.php?viewuser=$top[username]>$top[username]</a></td>;
    }
    ?>
    PHP:
    Thanks
     
    .KOA, Feb 18, 2008 IP
  4. .KOA

    .KOA Peon

    Messages:
    61
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Is there anyone online who can help?
     
    .KOA, Feb 18, 2008 IP
  5. 00johnny

    00johnny Peon

    Messages:
    149
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you missing a closing quote ( " ) on your print statement
     
    00johnny, Feb 18, 2008 IP
  6. mab

    mab Active Member

    Messages:
    563
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    80
    #6
    Exactly :) .
     
    mab, Feb 19, 2008 IP