Just Decode It! and you'll understand what I'm talking about, I had this happen once befroe and fixed it, but I can't seem to get it this time.
Hers the code for the first page.
<?
$location = "localhost";
$username = "000000";
$password = "000000";
$database = "000000";
$conn = mysql_connect("$location","$username","$password");
if (!$conn) die ("Could not connect MySQL");
mysql_select_db($database,$conn) or die ("Could not open database");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK REL=STYLESHEET TYPE="text/css" HREF="../stylesheets/style.css">
<style type="text/css">
<!--
.style4 {color: #00FFFF; font-weight: bold; }
body {
background-color: #000000;
}
-->
</style>
</head>
<body>
<p><strong><font color="#80FFFF">Our vin decoder is having technical difficulties at this time, I'm working on getting it fixed, please try again later. </font></strong></p>
<form name="vin" form action="search/search_vin.php" method="post" enctype="multipart/form-data" target="_self">
<table width="71%" align="center" >
<tr>
<th width="9%" scope="col"><font color="#80FFFF"><strong>Make :</strong></font></th>
<th width="8%" scope="col"><font color="#80FFFF"><strong>Year :</strong></font></th>
<th width="25%" scope="col"><span class="style4">Model :</span></th>
<th width="38%" scope="col"><font color="#80FFFF"><span class="style4">Vin Number :</span></font></th>
</tr>
<tr>
<td align="center"><font color="#80FFFF">
<SELECT NAME="make" id="make">
<?
$make = mysql_query("SELECT man_id, man_name FROM manufacture ORDER BY man_name");
while($row=mysql_fetch_array($make))
{
echo "<OPTION VALUE=\"" . $row[0] . "\">" . $row[1] . "\n";
}
?>
</SELECT>
</font></td>
<td align="center"><SELECT NAME="year">
<?
$years = mysql_query("SELECT year_id, year_name FROM year ORDER BY year_name");
while($row=mysql_fetch_array($years))
{
echo "<OPTION VALUE=\"" . $row[0] . "\">" . $row[1] . "\n";
}
?>
</SELECT></td>
<td align="center"><font color="#80FFFF">
<input name="model" type="text" id="model" size="20" maxlength="40">
</font></td>
<td><font color="#80FFFF">
<input name="vin" type="text" id="vin" size="30" maxlength="30">
</font></td>
<td><input name="vin" type="submit" id="vin" value="Decode It">
<?
if (($_POST['make']) && ($_POST['year']) && ($_POST['vin']) && ($_POST['model']))
{
$make = $_POST['make'];
$year = $_POST['year'];
$model = $_POST['model'];
$vin = $_POST['vin'];
?>
<?
if ($make == "4")
{
require ("../includes/chrysler.inc");
} elseif ($make == "9") {
require ("../includes/pontiac.inc");
} elseif ($make == "3") {
require ("../includes/chevrolet.inc");
}
}
?>
</td>
</tr>
</table>
<p> <font color="#80FFFF">
</font></p>
</form>
</body>
</html>
<br />
Heres the page that I think has a problem.
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Vin Search</title>
</head>
<body>
<center><h1>Thank you for using our Vin Decoder</h1></center>
<?php
$username = "000000";
$password = "000000";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password)
or die("(".mysql_errno().") Error:".mysql_error());
$selected = mysql_select_db("hotrod",$dbh)
or die("(".mysql_errno().") Error:".mysql_error());
include("template.php");
require("kword.php");
require("Classes.php");
require("config.php");
$query_where = "";
if (isset($_POST['Make'])) {
if ($query_where == "") {
$query_where .= " where ";
} else {
$query_where .= " and ";
}
$query_where .= "Make='" . $_POST['Make'] . "'";
}
if (isset($_POST['Model'])) {
if ($query_where == "") {
$query_where .= " where ";
} else {
$query_where .= " and ";
}
$query_where .= "Model='" . $_POST['Model'] . "'";
}
if (isset($_POST['Year'])) {
if ($query_where == "") {
$query_where .= " where ";
} else {
$query_where .= " and ";
}
$query_where .= "Year='" . $_POST['Year'] . "'";
if (isset($_POST['engine'])) {
if ($query_where == "") {
$query_where .= " where ";
} else {
$query_where .= " and ";
}
$query_where .= "engine='" . $_POST['engine'] . "'";
}
if (isset($_POST['styles'])) {
if ($query_where == "") {
$query_where .= " where ";
} else {
$query_where .= " and ";
}
$query_where .= "styles='" . $_POST['styles'] . "'";
}
if (isset($_POST['assembly'])) {
if ($query_where == "") {
$query_where .= " where ";
} else {
$query_where .= " and ";
}
$query_where .= "assembly='" . $_POST['assmebly'] . "'";
}
}
$query = "SELECT * FROM manufacture " . $query_where;
$result = mysql_query($query)
or die("(".mysql_errno().") Error:".mysql_error());
$fields = mysql_num_fields($result);
$query = "select * from assembly " . $query_where;
$result = mysql_query($query)
or die("(".mysql_errno().") Error:".mysql_error());
$fields = mysql_num_fields($result);
$query = "select * from engine " . $query_where;
$result = mysql_query($query)
or die("(".mysql_errno().") Error:".mysql_error());
$fields = mysql_num_fields($result);
$query = "select * from model " . $query_where;
$result = mysql_query($query)
or die("(".mysql_errno().") Error:".mysql_error());
$fields = mysql_num_fields($result);
echo "<table>\n<tr>";
for ($i=0; $i < $fields; $i++) //Table Header
{ print "<th>".mysql_field_name($result, $i)."</th>"; }
echo "</tr>\n";
while ($row = mysql_fetch_row($result)) { //Table body
echo "<tr>";
for ($f=0; $f < $fields; $f++) {
echo "<td>$row[$f]</td>"; }
echo "</tr>\n";}
echo "</table>";
mysql_free_result($result);
?>
</body>
</html>
Please let me know if you see any imediate problems.