echo mysql_escape_string($_GET['cfy']).' '.mysql_escape_string($_GET['cfm']).' '.mysql_escape_string($_GET['cfmo']);?>
$dbhost = "localhost";
$dbuser = "wiperwhi_ecomm";
$dbpass = "Amaci8ok";
$dbname = "wiperwhi_ecommsite";
mysql_connect($dbhost,$dbuser,$dbpass) or die(mysql_error());
mysql_select_db($dbname) or die(mysql_error());
$make = mysql_escape_string($_GET['make']);
$model = mysql_escape_string($_GET['model']);
$year = mysql_escape_string($_GET['syear']);
$r1 = mysql_query("SELECT wiperSize FROM wp_wiper WHERE makeId='$make' AND yearId='$year' AND modelId='$model' AND wiperLocation='D'") or die(mysql_error());
$a1 = mysql_fetch_array($r1);
$r2 = mysql_query("SELECT wiperSize FROM wp_wiper WHERE makeId='$make' AND yearId='$year' AND modelId='$model' AND wiperLocation='P'") or die(mysql_error());
$a2 = mysql_fetch_array($r2);
$r3 = mysql_query("SELECT wiperSize FROM wp_wiper WHERE makeId='$make' AND yearId='$year' AND modelId='$model' AND wiperLocation='R'") or die(mysql_error());
?>
|
Driver (D) |
Passenger (P) |
if(mysql_num_rows($r3)>0)
{
echo 'Rear (R) | ';
}
?>
What is my wiper size? |
echo $a1[0]; ?>" |
echo $a2[0]; ?>" |
if(mysql_num_rows($r3)>0)
{
$a3 = mysql_fetch_array($r3);
echo ''.$a3[0].'" | ';
}
?>
$r4 = mysql_query("SELECT * FROM wp_wiper WHERE makeId='$make' AND yearId='$year' AND modelId='$model' AND wiperCategory='Best'") or die(mysql_error());
$r5 = mysql_query("SELECT * FROM wp_wiper WHERE makeId='$make' AND yearId='$year' AND modelId='$model' AND wiperCategory='Better'") or die(mysql_error());
$r6 = mysql_query("SELECT * FROM wp_wiper WHERE makeId='$make' AND yearId='$year' AND modelId='$model' AND wiperCategory='Good'") or die(mysql_error());
$r7 = mysql_query("SELECT * FROM wp_wiper WHERE makeId='$make' AND yearId='$year' AND modelId='$model' AND wiperCategory='Rear'") or die(mysql_error());
$r8 = mysql_query("SELECT * FROM wp_wiper WHERE makeId='$make' AND yearId='$year' AND modelId='$model' AND wiperCategory='Winter'") or die(mysql_error());
echo '
';
echo ' | Wiper Blade | Features | Price | Availability | Qty | |
';
echo 'Best | |
';
if(mysql_num_rows($r4) > 0)
{
while($a4 = mysql_fetch_array($r4))
{
$r0 = mysql_query("SELECT * FROM wp_wiperKey WHERE wiperModel='$a4[6]'") or die(mysql_error());
$a0 = mysql_fetch_array($r0);
echo '';
}
}
else
{
echo 'No blades available in this category |
';
}
echo 'Better | |
';
if(mysql_num_rows($r5) > 0)
{
while($a5 = mysql_fetch_array($r5))
{
$r0 = mysql_query("SELECT * FROM wp_wiperKey WHERE wiperModel='$a5[6]'") or die(mysql_error());
$a0 = mysql_fetch_array($r0);
echo '';
}
}
else
{
echo 'No blades available in this category |
';
}
echo 'Good | |
';
if(mysql_num_rows($r6) > 0)
{
while($a6 = mysql_fetch_array($r6))
{
$r0 = mysql_query("SELECT * FROM wp_wiperKey WHERE wiperModel='$a6[6]'") or die(mysql_error());
$a0 = mysql_fetch_array($r0);
echo '
';
?>