by tha_ripmasta » Mon Feb 12, 2007 9:29 pm
Ok, Here is how it is.
I have a php file call add_make.php... which adds makes to the db, and add_model.php which adds models to the db.
Now i have a file add_car.php, where I add a new car to the db. and in this form I choose the Make and then the Model field gets filled with models from that make using AJAX and then I submit this data to the database.
Now here is where the codes i submitted first comes in.
Now I have a file call edit_all_cars.php, where I choose a car to edit, Then in edit_car.php, I would like to edit the car information, the car id variable from edit_all_cars.php goes over to edit_car.php.
And from there I pull the Make and Model from the DB.
DB Tables:
TABLE cars (
car_id int(9) NOT NULL auto_increment,
name varchar(60) NOT NULL default '',
make int(9) NOT NULL default '0',
model int(9) NOT NULL default '0',
PRIMARY KEY (car_id)
)
TABLE makes (
make_id int(9) NOT NULL auto_increment,
make varchar(50) NOT NULL default '',
PRIMARY KEY (make_id)
)
TABLE models (
model_id int(9) NOT NULL auto_increment,
make_id int(9) NOT NULL default '0',
model varchar(100) NOT NULL default '',
PRIMARY KEY (model_id)
)
Sorry for al that info, i'm still learning programming
[/code]
Last edited by
tha_ripmasta on Mon Feb 12, 2007 9:35 pm, edited 1 time in total.