1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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

    Likes Received:
    Best Answers:
    Trophy Points:
    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