VIN Decoder Help
Posted: Sat Aug 25, 2007 3:52 am
feyd | Please use
The PHP result's code:[/syntax]
Thank's.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I need some help with a VIN Decoder I am making, so basically what it is, is that the user put's in the Consecutive Unit Number (CUN) into the textbox and he/she click's submit and then it tell's you information about your car. Now I am a beginner in PHP but I do understand some about it and I do have some code I already made but it didn't work. I was thinking some kind of an array that show's all of the CUN's then when the user's CUN they entered match up with it then it get's the text to display and if the CUN isn't found it gives a error message like "Could not find your CUN in our list of CUNs."
Here is the code i've gotten.
The textbox page code:
[syntax="html"]
Just enter in your last 6 number's from your VIN (e.g. 1FABP40A6HF000001 so the information you would enter is 000001)
<form action="ascmclarenmustangresults.php" method="post">
CUN: <input type="text" name="vintextbox" />
<br />
<input name="submit" type="submit" />
</form>
Code: Select all
<?php
$cun = $_POST["vintextbox"];
if ($cun["vintextbox"] == '000001')
{
echo Car number $cun00["vintextbox"] is a 1987.</br>
}
if ($cun["vintextbox"] == '000002')
{
echo Car number $cun["vintextbox"] is a 1988.</br>
}
if ($cun["vintextbox"] == '000003')
{
echo Car Number $cun ["vintextbox"] is a 1989.</br>
}
{
else
echo Could not find your CUN in our list of CUNs.</br>
}feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]