Need help selecting records from mySQL dbase and printing them

Discussion in 'PHP' started by {S}tep, Nov 1, 2007.

  1. #1
    I need to generate a page that allows users to search for a record in my database and then print that record in a specific format.
    I'm pretty new to this and I don't know how to do either function.
    Can anyone help me?
    Thanks
     
    {S}tep, Nov 1, 2007 IP
  2. jakomo

    jakomo Well-Known Member

    Messages:
    4,262
    Likes Received:
    82
    Best Answers:
    0
    Trophy Points:
    138
    #2
    Hello,
    here you have an example http://html-resource.com/mysql.html where say Browse Information :)

    This is easy for example:

    $sql ="Select * from table";
    $result= mysql_query($sql);
    while ($row = mysql_fetch_assoc($result))
    {
    echo $row["field_name"];
    }

    Jakomo
     
    jakomo, Nov 1, 2007 IP
  3. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165