Някой може ли да ми сложи странициране на този код , който изкарва регистрираните потребителя.
PHP:
<?
ob_start();
include("config.php");
if (!$_GET[user])
{
$getuser = mysql_query("SELECT * from users order by id asc");
while ($user = mysql_fetch_array($getuser))
{
// gets all the users information.
echo ("<a href=\"members.php?user=$user[username]\">$user[username]</a><br />\n");
// links to a page to view the user's profile.
}
}
ELSE
{
$getuser = mysql_query("SELECT * from users where username = '$_GET[user]'");
$usernum = mysql_num_rows($getuser);
if ($usernum == 0)
{
echo ("Няма потребители");
}
else
{
$profile = mysql_fetch_array($getuser);
echo ("<center><b>Профила на: $profile[username]</b><br /></center><br />
<img src='$profile[avatars]' height='150' width='150'><br />
<b>Скайп</b>: $profile[msn]<br />
<b>Уеб сайт</b>: $profile[aim]<br />
<b>Град</b>: $profile[location]<br />
<b>Email адрес</b>: $profile[email]");
// in the above code, we display the user's information.
}
}
?>