SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Displaying Row Records

    Hi,
    I want to display my registered users on a page in my site, but i need to display MySQL record to do that.
    How would i?

    Database: loginsystem
    Table: users
    Row: username

    How do i display records from row username?

    (p.s. I already have a database connect php file)

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This is the kind of basic thing you generally look to books or tutorials for. Then when you need help doing something specific/complicated, you ask in a forum

    PHP Code:
    $sql "SELECT username FROM users";

    $result mysql_query($sql);

    while (
    $row mysql_fetch_array($result)) {

      echo 
    $row['username'] . "<br />";



    http://us3.php.net/manual/en/mysql.examples-basic.php
    http://us3.php.net/mysql_query
    http://us3.php.net/mysql_fetch_array


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
  •