Who knows how to fill out 1 form and have the information automatitcally appear in the next form?
THE PROBLEM:
IF I use an include("vin_code.php"); at the beginning of the form it decodes the vin number and kicks me out of the rest of the form.
The CODE is GOOD
php:
echo "<p>Enter the 17 Character VIN NUMBER:</p>";
echo "<form method=post action=\"" . $_SERVER['PHP_SELF'] . "\">";
echo "<p><INPUT TYPE=\"TEXT\" MAXLENGTH=\"17\" SIZE=\"31\" NAME=\"vin\"></p>";
echo "<p><INPUT TYPE=\"SUBMIT\" VALUE=\"Get Car Information\"></p>";
echo "</form>";
$vin = addslashes($_POST['vin']);
$countries = array(1 => 'United States',
2 => 'Canada',
3 => 'Mexico',
4 => 'United States',
'J'=> 'Japan',
'K'=> 'Korea',
'S'=> 'Great Britain',
'W'=> 'Germany',
'Z'=> 'Italy'
);
$makers = array(1 => 'Chevrolet',
2 => 'Pontiac',
3 => 'Oldsmobile',
4 => 'Buick',
5 => 'Pontiac',
6 => 'Cadillac',
7 => 'GM Canada',
8 => 'Saturn',
'A' => 'Audi',
// 'B' => 'BMW',
'B' => 'Dodge',
'C' => 'Chrysler',
'D' => 'Mercedes Benz',
'F' => 'Ford',
'G' => 'General Motors',
'H' => 'Honda',
'L' => 'Lincoln',
'M' => 'Mercury',
'N' => 'Nissan',
'P' => 'Plymouth',
'T' => 'Toyota',
'V' => 'Volvo',
'V' => 'Volkswagen'
);
$years = array(1 => '2001',
2 => '2002',
3 => '2003',
4 => '2004',
5 => '2005',
6 => '2006',
7 => '2007',
8 => '2008',
'J' => '1988',
'K' => '1989',
'L' => '1990',
'M' => '1991',
'N' => '1992',
'P' => '1993',
'R' => '1994',
'S' => '1995',
'T' => '1996',
'V' => '1997',
'W' => '1998',
'X' => '1999',
'Y' => '2000'
);
$vin_num = strtoupper($vin);
$country= $countries[substr($vin_num,0,1)];
$car_maker=$makers[substr($vin_num,1,1)];
$car_type=substr($vin_num,2,1);
$car_features=substr($vin_num,3,4);
$vin_correct=substr($vin_num,8,1);
$car_year=$years[substr($vin_num,9,1)];
$car_plant=substr($vin_num,10,1);
$car_sequence=substr($vin_num,11,6);
echo 'Origin: ';
echo $country;
echo '<br>';
echo 'Manufacturer: ';
echo $car_maker;
echo '<br>';
echo 'Division: ';
echo $car_type;
echo '<br>';
echo 'Features: ';
echo $car_features;
echo '<br>';
echo 'Correct Vin: ';
echo $vin_correct;
echo '<br>';
echo 'Car Year: ';
echo $car_year;
echo '<br>';
echo 'Mfg. Plant ';
echo $car_plant;
echo '<br>';
echo 'Serial Number: ';
echo $car_sequence;
?>
Help is appreciated
Thank you
JZ π