- Joined
- Dec 22, 2007
- Messages
- 184 (0.03/day)
- Location
- Central Nebraska
System Name | CORSAIR |
---|---|
Processor | AMD Phenom 1090T x6 @3.2 |
Motherboard | Gigabyte Ga-78LMT-S2P |
Cooling | High efficiency dust cooling |
Memory | 8GB GSkill DDR3 1333 |
Video Card(s) | Sapphire Radeon HD3870 512MB GDDR4 PCI-e toxic |
Storage | Seagate SV35.3 ST3250310SV 250GB SATAII(Windows 7 Pro x64), 320GB Samsung SATAII(Storage and SuSE) |
Display(s) | Dell 20" LCD, Dell 17" LCD |
Power Supply | Antec Cool Blue 650W Modular |
Software | Windows 7 Professional SP1, Visual Studio 2010 Ultimate |
***Unsolved***
Having trouble with the following code. The page worked until I tried to create the table to return results into rows with - now I get a 500 error when runnign the script. Any help is greatly appreciated.
Having trouble with the following code. The page worked until I tried to create the table to return results into rows with - now I get a 500 error when runnign the script. Any help is greatly appreciated.
Code:
<?php
mysql_connect("localhost", "invuser", "password") or die(mysql_error());
mysql_select_db("ITinventory") or die(mysql_error());
$result = mysql_query("SELECT * FROM Equipment")
or die(mysql_error());
echo "<html>";
echo "<body bgcolor=0066FF link=ffffff vlink=ffffff alink=ffffff>";
echo "<div style='width: 100%; height: 100%;'>";
echo "<font color=ffffff>";
echo '<h1 align=center>Inventory Listing</h1>';
echo '<a href="./index.html">Back</a>';
echo "<center><table style='width: 65%; background-color: 000066;'><tr><td width='100%'>";
echo "<font color=ffffff>";
echo '<h3>Current Items:</h3>';
echo "<div style='width: 100%; height: 350px; overflow: scroll; background-color: 0066FF;'>";
echo "<table width="100%">";
$count = 0;
while ($row = mysql_fetch_array( $result ))
{
echo "<tr>";
echo "<td width="25%">";
echo "ID: ".$row['ID']." | ";
echo "</td>";
echo "<td width="25%">";
echo "Name: ".$row['Name']." | ";
echo "</td>";
echo "<td width="25%">";
echo "Type: ".$row['Type']." | ";
echo "</td>";
echo "<td width="25%">";
echo "Model: ".$row['Model']." | ";
echo "</td>";
echo "</tr>";
echo '<br />';
$count++;
}
echo "</table>";
echo '</font>';
echo '</div>';
echo "</font>";
echo '</td></tr></table>';
echo "<table style='width: 65%; background-color: 000066;'><tr><td width=32%><a href='./index.html'><font color=ffffff><b>Back</b></a> to inventory search page.</font></td>";
echo "<td width=32%' align='right'><font color=ffffff>Item Count: <font color=ffff00>".$count."</font></td></tr>";
echo '</table></center><br /><br /><br />';
echo "</div>";
echo "</html>";
?>
Last edited: