Jump to content

Recommended Posts

Hey

 

First let me say I am not asking exactly how to do this. Just the best method of what I want to do. The idea is to have a database of every model of a dirt bike. A user who is logged in to the system can submit data for a dirt bike (I can create forms for this). On the main page of the database I need to be able to have the user select what model bike and year or years to find the information people submitted in a nice list. Do  you think this is to big of a project? I'm doing this as a hobby type thing so there really is no time schedule.

 

For making the database:

 

Would an array be best? Are there any examples somewhat close to what I'm talking about?

Link to comment
https://forums.phpfreaks.com/topic/212362-game-plan/
Share on other sites

Hey

 

First let me say I am not asking exactly how to do this. Just the best method of what I want to do. The idea is to have a database of every model of a dirt bike. A user who is logged in to the system can submit data for a dirt bike (I can create forms for this). On the main page of the database I need to be able to have the user select what model bike and year or years to find the information people submitted in a nice list. Do  you think this is to big of a project? I'm doing this as a hobby type thing so there really is no time schedule.

 

For making the database:

 

Would an array be best? Are there any examples somewhat close to what I'm talking about?

 

Well in your database you dont use an array, you do that on output in php.

Not sure how far you are, but hee are some thing i can think of that are needed to keep think nicely separted.

 

1) a member registration page (html), a php file to do the registration work, a database + table to add members.

(this already will take some time)

2) a page (html) to add a bike with all its features. a php file to do the work, a table within the same database to  store the added data. (maybe even more tables for categories and stuff, but i know nothing about bikes)

3) a page to retrieve the bike data (html)  a php file to ask de database/table for the bikes.

 

 

This is very basic and doesn't include an image file system. As with everything you can make stuff as difficult as possible. But its a  very nice project to learn php I think. Slice everything up in little projects and preferable have CSS in a separate file.

Link to comment
https://forums.phpfreaks.com/topic/212362-game-plan/#findComment-1106464
Share on other sites

The login system I figured I'd start out by modifying someone elses (jpmaster77). I have learned the basics just by doing that and how the code works. The login system is almost up and running except my one issue which I will figure out soon.

 

I made a nice list of the forms to get an idea of what I'm looking at. The only problem I see is the models. There are going to be so many that I don't know if I can keep track! Any way to make this easier? :confused:

 

//BIKE MODELS

 

//Drop Down List:

 

Makes:

 

KTM

Suzuki

Kawasaki

Yamaha

Honda

 

//When selected, the year box comes up. User needs to be able to select as many years he wants (perhaps check boxes):

 

Years:

 

2000

2001

2002

2003

2004

2005

2006

2007

2008

2009

2010

2011

Any

 

//Every Model of Bike based on the year and the make selected above. Amount can range from 0-20!

 

Model:

 

//Varies for each make and year.

 

 

 

//When selected, drop down menu of a few options ( {} groups together). ()= Examples )

 

{

Type:

 

Performance

Repair

 

Stage:

 

Stage 1 (stock)

Stage 2 (minor expenses but no engine work)

Stage 3 (expensive and usually require motor to be taken apart)

 

Difficulty:

 

Easy (Cutting a Wire, Taking off a Butt Plate)

Medium (Jetting, Drilling Exhuast)

Hard (Changing Ignition Map, Replacing Piston)

}

 

//Now this is where the user types in information about the mod.

 

Title of Mod:

 

Directions: (Be as descriptive as possible)

 

//Big Form

 

 

Additional Information/Links: (optional)

 

 

Link to comment
https://forums.phpfreaks.com/topic/212362-game-plan/#findComment-1106481
Share on other sites

Hi there,

 

For a project like this your find as time go's on, the record as well as data is forever expanding and changing therefore you need to start as you mean to go on.

 

break all data apart and build tables for each part and then when you have done this your find adding more or chaneging the data a 2 sec job.

 

You need to start with Makes and build a 2 record table.

 

INDEX_ID and MAKES

INDEX_ID is the index Auto Increments unique ID

MAKES would be charvar(30) KTM etc when you have added all of them records then start the same way on the next table

 

Build all reusable data like the about.

 

now making a form from all of the in them tables will be the next step.

 

As for saveing it to speed things up and save time your user record would be like index_id *key and then MAKES 12 (REF FROM MAKES table)

 

If you do your project this way when you add/change to MAKES tables everything is done simple.

 

Start building your tables in PhpMyAdmin and then ask about how to build a form you interact with the data

 

Link to comment
https://forums.phpfreaks.com/topic/212362-game-plan/#findComment-1106488
Share on other sites

Ok I'm slightly confused!  :'(

 

Just to go over it I make a table named the make (such as ktm or yamaha). For this example the table is called KTM.

 

Then for fields I make: index_id for numbering and set auto_increment.

 

Then do I add the model name in each field? For example in phpMyAdmin it would look like this:

 

Fields:      Type:    Coallation.... All these different things and settings.

 

index_id... int (3).... auto_increment... primary

50sx

65sx

85sx

125sx

150sx

250sx-f

350sx-f

450sx-f

125exc

200exc...

 

and so on.

 

OR

 

Do I do create a table called KTM for example

 

Create a field index_ip (same thing as above)

 

Create a field called models

 

Inside models create rows that are all the model names.

 

Thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/212362-game-plan/#findComment-1106571
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.