newb question

Discussion in 'MySQL' started by Blonde Jon, Apr 28, 2006.

  1. #1
    I'm a super newb to MYSQL and PHP. I figured out how to input data into a table from a form, now how do I display what's in my data base live on a website. Can this question even be answered that simply?
     
    Blonde Jon, Apr 28, 2006 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    This is just a basic explanation not the proper terms.

    You query the DB and tell it to find a reocrd that matchs whatever you want to display and to show those result on the screen using the echo command.

    I can post an example for you later in the day. I can't just write it but I can cut and paste.
     
    Colbyt, Apr 29, 2006 IP
  3. striker98

    striker98 Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    quick and dirty:
    
    $query = "select * from db_table";
    $result = mysql_query($result);
    while($row = mysql_fetch_row($result))
    {
    echo $row[0] . "<br/>"; // the first column in your table.
    }
    
    PHP:
    That should get you outputting text pretty quickly. You'll definately want to look into some php/mysql resources though to do more.
     
    striker98, Apr 29, 2006 IP
  4. Blonde Jon

    Blonde Jon Active Member Affiliate Manager

    Messages:
    745
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    58
    #4
    I found a website that had some codes. I got it to work, but I have a lot more stuff I want to do that is way beyond my skill level. I'm attempting to build an easy to use database for online registration for a kid's camp. I'm doing it for my own personal enrichment and to hopefully help some people out when I'm all done.
     
    Blonde Jon, Apr 29, 2006 IP
  5. arnek

    arnek Active Member

    Messages:
    134
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Sounds like a nice past-time project, and one could learn quite alot as I can imagine such a project can be expanded to a much more country wide user-base...
     
    arnek, Apr 30, 2006 IP
  6. blueoceanwave

    blueoceanwave Peon

    Messages:
    210
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    blueoceanwave, May 1, 2006 IP
  7. Blonde Jon

    Blonde Jon Active Member Affiliate Manager

    Messages:
    745
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    58
    #7
    Blonde Jon, May 1, 2006 IP