I don't understand why I getting an error on this. it ran on my IIS/PHP machine but on
my Apache/PHP I get errors. Here the code and the results, Please help:
<?php
session_start();
include("./inc/php_header.php")
?>
<font face=Arial size=2>
<?php
include("./mysql_connect_inc.php");
print "<h3>New Vehicle Search</h3><p>";
mysql_select_db( $db )
or die ( "Couldn't open $db: ".mysql_error() );
$result = mysql_query( "SELECT * from nctd_reviews WHERE model_year='$year'AND
manufacturer_name='$make' ORDER BY 'model_year', 'manufacturer_name'" );
$rows = mysql_num_rows( $result );
print "There are currently $rows vehicles that match your criteria.<p>";
print "<table width=475 border=0 cellpadding=0 cellspacing=1>\n";
print "<tr bgcolor=#D0D4E8><td width=50><font size=2><b>Year</b></font></td>";
print "<td width=325><font size=2><b>Make & Model</b></font></td><td width=100><font
size=2><b>MSRP</b></font></td></tr>";
while ($r = mysql_fetch_array($result))
{
extract($r);
print "<tr>\n";
print "<td><font size=2>$model_year</font></td><td><font size=2><a
href='vehicledetail.php?id=$ID'>$manufacturer_name
$model_name</a></font></td><td><font size=2>$ $base_price</td></font>\n";
print "</tr>\n";
$selectedyear = "$year";
$selectedmake = "$make";
}
print "</font></table>\n";
mysql_close( $link );
include("./inc/php_footer.php")
?>
Now the errors:
Warning: Supplied argument is not a valid MySQL result resource in
c:\apache\htdocs\ishophouston\newvehicles.php on line 12
There are currently vehicles that match your criteria.
Year Make & Model MSRP
Warning: Supplied argument is not a valid MySQL result resource in
c:\apache\htdocs\ishophouston\newvehicles.php on line 17