View Full Version : Show all registered users...
.KOA
Feb 18th 2008, 3:45 pm
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 ~
brearley147
Feb 18th 2008, 3:58 pm
Place this at the top
$username=$_SESSION['username'];
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>;
}
?>
.KOA
Feb 18th 2008, 5:35 pm
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>;
}
?>
Thanks
.KOA
Feb 18th 2008, 7:11 pm
Is there anyone online who can help?
00johnny
Feb 18th 2008, 7:18 pm
you missing a closing quote ( " ) on your print statement
mab
Feb 19th 2008, 10:31 am
you missing a closing quote ( " ) on your print statement
Exactly :) .
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.