PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am wondering if there is some way I could list the CategoryID and the heading I wanted and could get it to loop trough the mysql query and html table, so I don’t have to do the query and html table evert time
<?php
$location = "localhost";
$username = "computer_test";
$password = "test1";
$database = "computer_price";
$connection = mysql_connect("$location","$username","$password");
if (!$connection) die ("Could not connect MySQL");
mysql_select_db($database,$connection) or die ("Could not open database");
$profit = "1.3";
?>
$query="SELECT p.PartNumber, p.Description, round((p.IncTax*($profit)),1) AS Price FROM `price list` p WHERE p.CategoryID = '3700' OR p.CategoryID = '3800' ORDER BY CategoryID,PartNumber"
Not sure if i understand how you want the layout to look!
Do you want heading - 3800 ‘Network (Wired)’ and then list of related values below etc... or do you simply want to display a list of cat id's and the heading?