I am trying to figure out the best way to accomplish this task. I am making a website for a restaurant. I would like the client to be able to update prices, add items etc, and I have a mysql form that they can use to automatically update a database table, but I am trying to find the best way to automatically populate my html tables (on page load) with the data from the database. (Or reference table cells to cells in the database). any help would be greatly appreciated!
I included my code which contains one table.
I included my code which contains one table.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <table id="Table" border="0" cellspacing="1" cellpadding="2" width="479px" height:100%;"> <tr style="height: 40px;"> <td width="209px"><p style="margin-bottom: 0px;"><b><span style="font-size: 16pt;"> Pizzas</span></b></p></td> <td width="65"><p align="center" style="margin-bottom: 0px;">Giant<br /> slice</p> </td> <td width="65"><p align="center" style="margin-bottom: 0px;">12"<br /> Small</p></td> <td width="65"><p align="center" style="margin-bottom: 0px;">16"<br /> Large</p></td> <td width="65"><p align="center" style="margin-bottom: 0px;">18x26"<br /> Sheet</p></td> </tr> <tr style="height: 20px;"> <td><p style="margin-bottom: 0px;"> Cheese</p></td> <td><p align="center" style="margin-bottom: 0px;"> $3.95</p></td> <td><p align="center" style="margin-bottom: 0px;"> $3.95</p></td> <td><p align="center" style="margin-bottom: 0px;"> $3.95</p></td> <td><p align="center" style="margin-bottom: 0px;"> $3.95</p></td> </tr> <tr style="height: 22px;"> <td><p style="margin-bottom: 0px;"> Cheese & Pepperoni</p></td> <td><p align="center" style="margin-bottom: 0px;"> $1.25</p></td> <td><p align="center" style="margin-bottom: 0px;"> $1.25</p></td> <td><p align="center" style="margin-bottom: 0px;"> $1.25</p></td> <td><p align="center" style="margin-bottom: 0px;"> $1.25</p></td> </tr> <tr style="height: 21px;"> <td><p style="margin-bottom: 0px;"> Extra Toppings</p></td> <td><p align="center" style="margin-bottom: 0px;"> $1.75</p></td> <td><p align="center" style="margin-bottom: 0px;"> $1.75</p></td> <td><p align="center" style="margin-bottom: 0px;"> $1.75</p></td> <td><p align="center" style="margin-bottom: 0px;"> $1.75</p></td> </tr> <tr style="height: 20px;"> <td><p style="margin-bottom: 0px;"> Extra Cheese</p></td> <td><p align="center" style="margin-bottom: 0px;"> $4.95</p></td> <td><p align="center" style="margin-bottom: 0px;"> $4.95</p></td> <td><p align="center" style="margin-bottom: 0px;"> $4.95</p></td> <td><p align="center" style="margin-bottom: 0px;"> $4.95</p></td> </tr> </table> </body> </html>
Comment