Jump to content

PHP WITH JAVASCRIPT


cry of war

Recommended Posts

Im working with javascript that is changed depending on what is in the server by a mysql_fetch_array (blah,both)

 

But the only prob is that the javascript isnt kicking up after the page is opened any idea why it isnt i have tried 3 different javascripts one of which i got as and example from W3schools and 2 of which the javascripts worked before I embedded the javascript

Link to comment
Share on other sites

ok the codes a little long but it all works no errors or anything just the javascript doesnt work i mean i can veiwsource it and copy the text and it works but it doesnt work when it stands alone for some stupid reason

 

 

layout.php

<!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" xml:lang="en" lang="en">
<head><title>Goshen Coach Part List</title>
<link rel="stylesheet" href="03_3columnplustopbox.css" type="text/css" media="all" />
<body>
<?php
ini_set('display_errors', '1');
error_reportIng(E_ALL);
include "databaseconnect.php";
$table="Item";
/**SCRIPT**/
echo "\n<script type=\"text/javascript\">";$result = mysql_query("SELECT * FROM `$table` ORDER BY `ID`");
if (!is_resource($result)){
               echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\nfunction mouseOver()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"300\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"300\"";
echo "\n}";
echo "\nfunction mouseOut()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"100\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"100\"";
echo "\n}";
}
}
echo "\n</script>";
/**ENDSCRIPT**/
?>
<div id="top">
<p>banner goes here</p>
</div>
<div id="left">
<TABLE align="center">
<tr align="left">
<td colspan="2"><A href="#a">A...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'a%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>

<tr align="left">
<td colspan="2"><A href="#b">B...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'b%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#c">C...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'c%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#d">D...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'd%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#e">E...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'e%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#f">F...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'f%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#g">G...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'g%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#h">H...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'h%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#i">I...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'i%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#j">J...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'j%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#k">K...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'k%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#l">L...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'l%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#m">M...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'm%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#n">N...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'n%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#o">O...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'o%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#p">P...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'p%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#q">Q...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'q%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#r">R...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'r%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#s">S...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 's%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#t">T...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 't%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#u">U...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'u%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#v">V...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'v%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#w">W...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'w%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#x">X...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'x%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#y">Y...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'y%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<tr align="left">
<td colspan="2"><A href="#z">Z...</A></td>
</tr>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'z%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "<td colspan=\"2\">\nThere are no items in the Database that start with this Letter</td>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "\n<tr><td></td><td><A href=\"#".$row1['ID']."\">".$row1['ID']."</A></td></tr>";
}
}
?>
<br>
</table>
</div>
<div id="middle">
<TABLE align="center">
</table>
<TABLE align="center">
<tr align="center">
<td>
Click the letter that corresponds to the first letter in the parts name.
</td>
</tr>
</table>
<TABLE align="center">
<tr align="center">
<td>
<A href="#a">A</A>,
<A href="#b">B</A>,
<A href="#c">C</A>,
<A href="#d">D</A>,
<A href="#e">E</A>,
<A href="#f">F</A>,
<A href="#g">G</A>,
<A href="#h">H</A>,
<A href="#i">I</A>,
<A href="#j">J</A>,
<A href="#k">K</A>,
<A href="#l">L</A>,
<A href="#m">M</A>,
<A href="#n">N</A>,
<A href="#o">O</A>,
<A href="#p">P</A>,
<A href="#q">Q</A>,
<A href="#r">R</A>,
<A href="#s">S</A>,
<A href="#t">T</A>,
<A href="#u">U</A>,
<A href="#v">V</A>,
<A href="#w">W</A>,
<A href="#x">X</A>,
<A href="#y">Y</A>,
<A href="#z">Z</A>
<br>
</td>
</tr>
</table>

<table>
<A name="a">A...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'a%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="b">B...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'b%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="c">C...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'c%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="d">D...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'd%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="e">E...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'e%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="f">F...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'f%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="g">G...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'g%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="h">H...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'h%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="i">I...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'i%' ORDER BY `ID`");
if (!is_resource($result)){
               echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>

Link to comment
Share on other sites

Part 2 post was to large for 1 post

<A name="j">J...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'j%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="k">K...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'k%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="l">L...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'l%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="m">M...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'm%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="n">N...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'n%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="o">O...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'o%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="p">P...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'p%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="q">Q...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'q%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="r">R...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'r%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="s">S...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 's%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "\n<script type=\"text/javascript\">";
echo "\nfunction mouseOver()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"300\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"300\"";
echo "\n}";
echo "\nfunction mouseOut()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"100\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"100\"";
echo "\n}";
echo "\n</script>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="t">T...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 't%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "\n<script type=\"text/javascript\">";
echo "\nfunction mouseOver()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"300\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"300\"";
echo "\n}";
echo "\nfunction mouseOut()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"100\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"100\"";
echo "\n}";
echo "\n</script>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="u">U...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'u%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "\n<script type=\"text/javascript\">";
echo "\nfunction mouseOver()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"300\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"300\"";
echo "\n}";
echo "\nfunction mouseOut()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"100\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"100\"";
echo "\n}";
echo "\n</script>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="v">V...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'v%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "\n<script type=\"text/javascript\">";
echo "\nfunction mouseOver()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"300\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"300\"";
echo "\n}";
echo "\nfunction mouseOut()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"100\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"100\"";
echo "\n}";
echo "\n</script>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="w">W...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'w%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "\n<script type=\"text/javascript\">";
echo "\nfunction mouseOver()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"300\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"300\"";
echo "\n}";
echo "\nfunction mouseOut()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"100\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"100\"";
echo "\n}";
echo "\n</script>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="x">X...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'x%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "\n<script type=\"text/javascript\">";
echo "\nfunction mouseOver()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"300\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"300\"";
echo "\n}";
echo "\nfunction mouseOut()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"100\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"100\"";
echo "\n}";
echo "\n</script>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="y">Y...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'y%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "\n<script type=\"text/javascript\">";
echo "\nfunction mouseOver()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"300\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"300\"";
echo "\n}";
echo "\nfunction mouseOut()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"100\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"100\"";
echo "\n}";
echo "\n</script>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
<A name="z">Z...</A><br>
<?php
$result = mysql_query("SELECT * FROM `$table` WHERE `ID` LIKE 'z%' ORDER BY `ID`");
if (!is_resource($result)){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_array($result, MYSQL_BOTH)) {
echo "<table>";
echo "\n<A name=\"".$row1['ID']."\"></A>";
echo "\n<script type=\"text/javascript\">";
echo "\nfunction mouseOver()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"300\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"300\"";
echo "\n}";
echo "\nfunction mouseOut()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"100\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"100\"";
echo "\n}";
echo "\n</script>";
echo "<TABLE align=\"center\">";
echo "\n<tr>";
echo "<td align=\"center\" rowspan=\"6\">";
echo "<img id=\"".$row1['ID']."\" border=\"0\" alt=\"".$row1['ID']."\" src=\"".$row1['Image']."\" width=\"100\" height=\"100\" onmouseover=\"mouseOver()\" onmouseout=\"mouseOut()\" />";
echo "\n</td>";
echo "\n<td colspan=\"2\">";
echo "Name of product/ID:".$row1['ID']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td>";
echo "Price of Part:".$row1['Price']."";
echo "\n</td>";
echo "\n<td>";
echo "Number in Stock:".$row1['Stock']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item information:".$row1['Info']."";
echo "\n</td>";
echo "\n</tr>";
echo "\n<tr>";
echo "\n<td colspan=\"2\">";
echo "Item discription:<br>".$row1['Discription']."";
echo "\n</td>";
echo "\n</tr>";
echo "</table>";
}
}
?>
</table>
</div>
</body>
</html>

Databaseconnect.php    (part of the include file)

<?php
ini_set("display_errors", "1");
error_reporting(E_ALL);
/***MySQLconnect***/
$host="localhost";
$user="like i will";
$password="ever tell you my info";
/***databaseconnect***/
$databasename= "game1";
/****coding****/
$link = mysql_connect("$host", "$user", "$password");

if ( !is_resource( $link ) )
                echo "Failed to connect to the MySQL service.<br />";

			/**if (!$link) {
    die("Could not connect: " . mysql_error());
}**/
$db_selected = mysql_select_db("$databasename");
if (!$db_selected) {
    die("Could not select database: " . mysql_error());
}
?>

 

and the Css file for the file so the div tags work right.

 

 

03_3columnplustopbox.css

body {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
font-family: verdana, arial, helvetica, sans-serif;
color: #ccc;
background-color: #333;
}
a {
text-decoration: none;
font-weight: bold;
color:  #ccc;
outline: none;
}
a:visited {
color:  #ccc;
}
a:active {
color:  #ccc;
}
a:hover {
color: #ccc;
text-decoration: underline;
}
.ahem {
display: none;
}
strong, b {
font-weight: bold;
}
p {
font-size: 12px;
line-height: 22px;
margin-top: 20px;
margin-bottom: 10px; 
}

h1 {
font-size: 24px;
line-height: 44px;
font-weight: bold;
margin-top: 0;
margin-bottom: 0;
}
h2 {
font-size: 18px;
line-height: 40px;
font-weight: bold;
margin-top: 0;
margin-bottom: 0;
}
h3 {
font-size: 16px;
line-height: 22px;
font-weight: bold;
margin-top: 0;
margin-bottom: 0;
}
h4 {
font-size: 14px;
line-height: 26px;
font-weight: bold;
margin-top: 0;
margin-bottom: 0;
}
h5 {
font-size: 12px;
line-height: 22px;
font-weight: bold;
margin-top: 0;
margin-bottom: 0;
}
h6 {
font-size: 10px;
line-height: 18px;
font-weight: bold;
margin-top: 0;
margin-bottom: 0;
}
img {
border: 0;
}
.nowrap {
white-space: nowrap;
font-size: 10px;
font-weight: bold;
margin-top: 0;
margin-bottom: 0;
/* must be combined with nobr in html for ie5win */
}
.tiny {
font-size: 9px;
line-height: 16px;
margin-top: 15px;
margin-bottom: 5px; 
}	
#top {
margin: 20px 20px 0px 20px;
padding: 10px;
border: 5px solid #ccc;
background: #666;
height: 100px; /* ie5win fudge begins */
voice-family: "\"}\"";
voice-family:inherit;
height: 70px;
}
html>body #top {
height: 70px; /* ie5win fudge ends */
}
#left {
position: absolute;
top: 120px;
left: 0px;
margin: 20px;
padding: 10px;
border: 5px solid #ccc;
background: #666;
width: 150px; /* ie5win fudge begins */
voice-family: "\"}\"";
voice-family:inherit;
width: 120px;
}
html>body #left {
width: 120px; /* ie5win fudge ends */
}
#middle {
margin: 20px 20px 20px 190px;
padding: 10px;
border: 5px solid #ccc;
background: #666;
}
/*
#right {
position: absolute;
top: 120px;
right: 0px;
margin: 20px;
padding: 10px;
border: 5px solid #ccc;
background: #666;
width: 150px; 
voice-family: "\"}\"";
voice-family:inherit;
width: 120px;
html>body #right {
width: 120px;
}
*/
pre {
font-size: 12px;
line-height: 22px;
margin-top: 20px;
margin-bottom: 10px; 
}

Link to comment
Share on other sites

My recommendation here is

1) Separate your html & php. (php at top, html with variables at bottom with NO logic inside it).

2) Check your javascript is written out correctly

3) DON'T do thousands of MySQL calls because you're going to turn your database is going to cry.

 

Part 1 will reduce the size if your files significantly and remove all the echo statements that currently plague your code and make it near impossible to maintain.

Part 2 can be done using "view source" is all major browsers. Do this and get back to me.

Part 3, think about what data you need, what you don't, and what you're doing. 1000's of calls don't make enterprise sense.

 

Once you have established the above then tell me what happens when you mouseover the image in question? Do you have a URL/link that you can provide for testing?

Link to comment
Share on other sites

My recommendation here is

1) Separate your html & php. (php at top, html with variables at bottom with NO logic inside it).

2) Check your javascript is written out correctly

3) DON'T do thousands of MySQL calls because you're going to turn your database is going to cry.

 

Part 1 will reduce the size if your files significantly and remove all the echo statements that currently plague your code and make it near impossible to maintain.

Part 2 can be done using "view source" is all major browsers. Do this and get back to me.

Part 3, think about what data you need, what you don't, and what you're doing. 1000's of calls don't make enterprise sense.

 

Once you have established the above then tell me what happens when you mouseover the image in question? Do you have a URL/link that you can provide for testing?

 

1. cant otherwise the coding doesnt come out dynamic like it does.

2. javascript works tested it half a dozen times when i take it out of the html file made by the php file. but it doesnt when its still in the php file php file=> html file(javascript doesnt work)=> view source =>notepad => new html file(javascript works)

3. Need the 126 some odd Mysql calls because the Mysql_fetch_array kills any variable it seems to touch if i try to reuse the var it will throw up an error

Link to comment
Share on other sites

Whenever you have the same code repeated in your source, you can use "for" loops in your PHP to reduce the size of the script source.

 

Here is my attempt at cleaning up your 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" xml:lang="en" lang="en">
<head><title>Goshen Coach Part List</title>
<link rel="stylesheet" href="03_3columnplustopbox.css" type="text/css" media="all" />
<body>
<?php
ini_set('display_errors', '1');
error_reportIng(E_ALL);
include "databaseconnect.php";
$table="Item";
/**SCRIPT**/
echo "\n<script type=\"text/javascript\">";
$q = "SELECT ID FROM `$table` ORDER BY `ID`";
$result = mysql_query($q) or die("Problem with the query: $q<br \>" . mysql_error());
if (mysql_num_rows($result) == 0){
                echo "\nThere are no items in the Database that start with this Letter<br>";
} else {
while ($row1 = mysql_fetch_assoc($result)) {
echo "\nfunction mouseOver()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"300\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"300\"";
echo "\n}";
echo "\nfunction mouseOut()";
echo "\n{";
echo "\ndocument.getElementById(\"".$row1['ID']."\").height=\"100\"";
echo "\ndocument.getElementById(\"".$row1['ID']."\").width=\"100\"";
echo "\n}";
}
}
echo "\n</script>";
/**ENDSCRIPT**/
?>
<div id="top">
<p>banner goes here</p>
</div>
<div id="left">
<TABLE align="center">
<?php
    foreach (range('a','z') as $ltr) {
$tmp = array();
$tmp[] = '<tr align="left">';
$tmp[] = '<td colspan="2"><A href="#' . $ltr . '">' . strtoupper($ltr) . '...</A></td>';
$tmp[] = '</tr>';
$q = "SELECT ID FROM `$table` WHERE `ID` LIKE '" . $ltr . "%' ORDER BY `ID`";
$result = mysql_query($q) or die("Problem with the query: $q<br />" . mysql_error());
if (mysql_num_rows($result) == 0)
                $tmp[] = '<td colspan="2">There are no items in the Database that start with this Letter</td>';
else {
	while ($row1 = mysql_fetch_assoc($result))
		$tmp[] = '<tr><td></td><td><A href="#'.$row1['ID'].'">'.$row1['ID'].'</A></td></tr>';
}
    }
    echo implode("\n",$tmo)."\n";
?>
<br>
</table>
</div>
<div id="middle">
<TABLE align="center">
</table>
<TABLE align="center">
<tr align="center">
<td>
Click the letter that corresponds to the first letter in the parts name.
</td>
</tr>
</table>
<TABLE align="center">
<tr align="center">
<td>
<?php
    $tmp = array();
    foreach (range('a','z') as $ltr)
$tmp[] = '<A href="#' . $ltr . '">' . strtoupper($ltr) . '</A>';
    echo implode("\n",$tmp) . "\n";
?>
<br>
</td>
</tr>
</table>

<table>
<?php
    $tmp = array();
    foreach (range('a','z') as $ltr) {
$tmp[] = '<A name="' . $ltr . '">' . strtoupper($ltr) . '...</A><br>';
$q = "SELECT * FROM `$table` WHERE `ID` LIKE 'a%' ORDER BY `ID`";
$result = mysql_query($q) or die("Problem with the query: $q<br/>" . mysql_error());
if (mysql_num_rows($result) == 0)
                $tmp[] = "There are no items in the Database that start with this Letter<br>";
else {
	while ($row1 = mysql_fetch_assoc($result)) {
		$tmp[] = '<table>';
		$tmp[] = '<A name="' . $row1['ID'] . '"></A>';
		$tmp[] = '<TABLE align="center">';
		$tmp[] = '<tr>';
		$tmp[] = '<td align="center" rowspan="6">';
		$tmp[] = '<img id="' . $row1['ID'] . '" border="0" alt="' . $row1['ID'] . '" src="' . $row1['Image'] . '" width="100" height="100" onmouseover="mouseOver()" onmouseout="mouseOut()" />';
		$tmp[] = '</td>';
		$tmp[] = '<td colspan="2">';
		$tmp[] = 'Name of product/ID:' . $row1['ID'];
		$tmp[] = '</td>';
		$tmp[] = '</tr>';
		$tmp[] = '<tr>';
		$tmp[] = '<td>';
		$tmp[] = 'Price of Part:' . $row1['Price'];
		$tmp[] = '</td>';
		$tmp[] = '<td>';
		$tmp[] = 'Number in Stock:' . $row1['Stock'];
		$tmp[] = '</td>';
		$tmp[] = '</tr>';
		$tmp[] = '<tr>';
		$tmp[] = '<td colspan="2">';
		$tmp[] = 'Item information:' . $row1['Info'];
		$tmp[] = '</td>';
		$tmp[] = '</tr>';
		$tmp[] = '<tr>';
		$tmp[] = '<td colspan="2">';
		$tmp[] = 'Item discription:<br>' . $row1['Discription'];
		$tmp[] = '</td>';
		$tmp[] = '</tr>';
		$tmp[] = '</table>';
	}
}
    }
    echo implode("\n",$tmp)."\n";
?>
</table>
</div>
</body>
</html>

 

I haven't checked this for syntax errors, so there may be some.

 

Ken

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.