Ok, Right off the bat. I am very new to this. I have been doing a bunch of reading on PHP and MySQL and I have managed to get my flat file read into a database table and have managed to connect to the database. This is where I'm getting stuck.. I have what I believe is a pretty simple task for an experienced PHP user but for me it's turning into quiet a task. Here is what I want to accomplish: An example that does some but not all of what I want to do can be seen here: http://qa.car-part.com/cgi-bin/jeffm.cgi
I have data in 8 different columns in my table.
1. primary
2. model_number
3. year
4. model
5. part
6. part_type
7. side
8. part_number
Step one:
I want to display one drop down box, populated from the field in my table called model_number. This field contains duplicates but I only want to display the uniques. The user would select his choice from the drop down and click on a submit query button to look up the Model Number.
Sometimes there exists more than one year for a model_number and in this case the user would be prompted with a drop down box or radio button that asks the user to select the year but only if more than one year exists for the model_number selected.
Step two:
User then selects a Part Type from a second drop down list. This could be ENG, TRA, FEN, and so on. The part_type list is populated from the part_type column which contains many duplicates but again only uniques are displayed. All are three character abbreviations like I just listed.
If the Part type is one that there is a Left side or Right side possibility like a Fender (FEN), then he gets another drop down or radio button that prompts him to choose a side.
Step three:
The user then submits this query and is returned the part_number for the part looked up with the part name displayed next to it that is retrieved from the part column of the table.
At this point I want the part_number and part that is displayed to have a submit button next to it labeled Interchange that will allow the user to submit this part_number to the database and look up all the possible model_number, year, model and part that contain this part_number.
This is interchange which is what I am trying to accomplish. One of my hobbies is old Vintage Sears Tractors and I have about 20,000 rows of part numbers that I can use to produce this interchange. This way a person can look up a part, find the part number for the part he wants then see what all year and model tractors had this part.
I honestly don't know where to start. Help!! Thanks Jody
Here is some sample data:
model_number,year,model,part,part_type,side,part_number
917.99400,1966,Sears Suburban 10,"ENGINE, 10 HP",ENG,,634A53
917.99410,1966,Sears Suburban 10,"ENGINE, 10 HP",ENG,,634A21
917.99420,1966,Sears Suburban 12,"ENGINE, 12 HP",ENG,,634A54
917.99500,1964,Sears Custom 600,"ENGINE, 6 HP",ENG,,626A70
917.99510,1964,Sears Custom 600,"ENGINE, 6 HP",ENG,,626A71
917.99520,1965,Sears Custom 600,"ENGINE, 6 HP",ENG,,N/P
917.99530,1965,Sears Custom 600,"ENGINE, 6 HP",ENG,,N/P
917.99800,1966,Sears Custom 600,"ENGINE, 6 HP",ENG,,626A103
917.99820,1967,Sears Custom 600,"ENGINE, 6 HP",ENG,,626A144
917.25400,1967,Sears Hydro Trac 12,"ENGINE, 12HP",ENG,,634A253
917.25311,1968,Sears SS 12,FENDER W/BRACE (LH),FEN,L,634A212A
917.25311,1968,Sears SS 12,FENDER W/BRACE (RH),FEN,R,634A213A
917.25010,1967,Sears Custom 6,FENDER (LH),FEN,L,7147H
917.25010,1967,Sears Custom 6,FENDER (RH),FEN,R,714811
917.25020,1967,Sears Custom 6,FENDER (LH),FEN,L,7147H
917.25020,1967,Sears Custom 6,FENDER (RH),FEN,R,714811
917.25030,1972,Sears Compact 8,FENDER (RH),FEN,R,626A177A
917.25030,1972,Sears Compact 8,FENDER W/BRACE (LH),FEN,L,626A176A
917.25040,1972,Sears Compact 8E,FENDER (RH),FEN,R,626A177A
917.25040,1972,Sears Compact 8E,FENDER W/BRACE (LH),FEN,L,626A176A
917.25060,1972,Sears Custom 10 XL,FENDER W/BRACE (RH),FEN,R,634A213A
917.25060,1972,Sears Custom 10 XL,FENDER W/BRACE (LH),FEN,L,634A212A
917.25100,1967,Sears Suburban 10,FENDER (RH),FEN,R,7185H
917.25100,1967,Sears Suburban 10,FENDER (LH),FEN,L,7186H
917.25110,1967,Sears Suburban 10,FENDER (RH),FEN,R,7185H