SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    United Kingdom
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with this scenario:

    Okay, I've got a database, filled with a table called gbapreviews. This in turn is filled with many previews, that can be updated by a script.

    I'd like to know if it's possible to list each of the previews in an index, with the name linking to that article - but so that it updates automatically: everytime a new preview is submitted, it will be added to the list.

    The date the article was posted ($DatePosted) and the genre (SGenre) will also be displayed, for example:

    Resident Evil 0 Action 2001/09/18
    Zelda: OoT Adventure 2001/09/26

    Remember that the names above would then link to the actual article, ie previews.php?id=6 or prebiews.phpid=2.

    Any help is greatly appreciated, thanks.
    No one is a virgin, life screws us all

  2. #2
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $result mysql_query("select * fromgbapreviews");

    while (
    $row=mysql_fetch_array($result))
    {
          echo
    "<a href = 'games.php?id=$row[id]'>$row[gamename]</a> $row[DatePosted] $row[SGengre]";

    something along the lines of that


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
  •