I want to make offer for my hosting company. I made a table with the offers:
CREATE TABLE `planes` (
`id` int(5) unsigned NOT NULL auto_increment,
`DiskSpace` text NOT NULL,
`AnnuallyDataTransfer` text NOT NULL,
`FTPAccounts` text NOT NULL,
`EmailBoxes` text NOT NULL,
`BandwidthAllowance` text NOT NULL,
`FreeDomains` text NOT NULL,
`MySQLDatabases` text NOT NULL,
`price` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
INSERT INTO `planes` VALUES (1, '5GB', 'Unlimited', '25', '1000', 'Unlimited', '1', 'Unlimited', '200 LE');
INSERT INTO `planes` VALUES (2, '10 GB', 'Unlimited', '50', '1000', 'Unlimited', '1', 'Unlimited', '300');
Then I tried to show that offers in php
codes. Here is the code:
<?php
$result = mysql_query("SELECT * FROM planes ORDER BY id DESC LIMIT 0,2") or die(mysql_error());
$Disc = 1;
echo '<table class="ranking">';
echo '<tr><td class="rankhead">#</td><td class="rankhead">Plan1</td><td class="rankhead">Plan2</td><td class="rankhead">plan3</td></tr>';
while($row = mysql_fetch_array( $result )){
$name = $row['AnnuallyDataTransfer'];
$Disc = $row['FTPAccounts'];
$class = $row['EmailBoxes'];
echo '<tr>';
echo '<td class="rankvalues">'.$Disc.'</td>';
echo '<td class="rankvalues">'.$name.'</td>';
echo '<td class="rankvalues">'.$Disc.'</td>';
echo '<td class="rankvalues">'.$class.'</td>';
$Disc++;
echo "</tr>";
}
echo "</table>";
?>
But I got error design. I want to show all the offers field into the left as a column and offers on row and each offer has has it's value from the field on the left.