mt sql to html table

Discussion in 'Databases' started by vankata981226, Apr 15, 2012.

  1. #1
    hallo guys,
    I am new here and also in programing and i have a project with witch i am struggling.
    I have made a html table with cells and everything and i have made a simple database with phpmyadmin v5.5 i think...and my question is :
    how can i use the database to populate the html table, and not generate a table with sql...i just need to populate an existing table with information. how to connect them together?

    thank you previously
     
    vankata981226, Apr 15, 2012 IP
  2. Findaserver

    Findaserver Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can use php to connect to the mysql server. From there you would use the mysql_connect or mysqli_connect command to connect to the server. After connecting run a query like "SELECT * FROM 'tbl_name'" and then do a mysql_fetch_assoc to grab the information from the mysql server. Then echo it.

    If you wanted to display the whole table, then you would have to make a php loop. Google "display table php"

    Edit: If you do not understand any of the commands I just said, you can use tizag or w3schools to learn them. Have fun :)
     
    Findaserver, Apr 15, 2012 IP