T4VN is an online PHP Help community that provides PHP Tutorials, PHP Examples, PHP Scripts, PHP Support
    HOME  |  HOSTING COUPON  |  TEMPLATE  |  PHP SCRIPTS  |  LINK TO US  |  LINK  |  REGISTER | CONTACT
::: Member Login :::
 Username
 Password
 
Forgot your password ?
::: PHP Tutotal :::
  PHP Basic (7)
  PHP Advanced (4)
  PHP Database (2)
  Coding Step By Step (8)
  PHP and AJAX (0)
::: PHP Example :::
  Arrays (1)
  Code Highlighters (3)
  Database Functions (12)
  Date & Time (5)
  E-Mail (6)
  Forms (5)
  Guestbooks (1)
  Logging (2)
  Miscellaneous (10)
  Password Generators (3)
  Randomizers (3)
  String Manipulation (10)
  User Authentication (6)
::: Search On T4VN :::
::: T4VN Statistics :::
  PHP Scripts : 61
  PHP Example : 67
  PHP Tutorials : 21
  PHP News : 93
  Total Coupon : 36
  Other Tutorials :
  Member : 209
  Visitor Online : 6
  Today Visit: 387
  Total Visitor : 262397
  Most Online : 31
::: Sponsored Links :::

PR 4 For This Webpage
Home Today :

Creating a Members List

Author : lifeg0eson666

This will simply display the ID and Username of the members in your database.

PHP Example :

<?php
    $connection 
mysql_connect(localhost,USER,PASSWORD); 
    
$db mysql_select_db(DATABASE$connection);

$sql "SELECT id,username FROM TABLE";
$result mysql_query($sql);
//$link = "<a href='profile.php?id=$row[id]'>";
//uncomment $link and $el if you want it linkable
$td "<td>";
//$el = "</a>";
echo "<table border=0 cellspacing=0 cellpadding=2 width=200>";
echo 
"<tr><td>ID<td>Username";
while (
$row mysql_fetch_array($resultMYSQL_BOTH)) {
    echo 
"<tr><td>";
    
printf ("%s $td $link %s $el"$row[0], $row["username"]);
}

mysql_free_result($result);
?> 



Other Example
Get data from multiple fields - tables
Check if a table exists
SQL script import function
Data Type Converter between PHP and PostgreSQL
mssql escape string
Insert/Update/Delete functions


::: Resources :::
  Links Directory
  Programming 2 3
  Webmaster 2 3
  Web Design 2 3
  Web Hosting 2 3
  Other Links 2 3
  Asian ShowBiz News
  Teach Seo For You
::: New Templates :::




::: Other Tutorials :::
 Program Design

  Powered By T4VN.NET - Version 2.0 - CopyRight © T4VN.NET 2005-2007