Author Topic: Game Plan  (Read 523 times)

0 Members and 1 Guest are viewing this topic.

Offline zachatk1Topic starter

  • Irregular
  • Posts: 38
    • View Profile
Game Plan
« on: September 02, 2010, 08:41:21 AM »
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?

Offline fortnox007

  • Devotee
  • Posts: 777
  • Gender: Female
  • mooOO
    • View Profile
Re: Game Plan
« Reply #1 on: September 02, 2010, 09:07:38 AM »
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.
"Give a monkey a banana and you feed him for a day; teach a monkey to rob banks and he will feed you for a lifetime."
http://www.addedbytes.com/writing-secure-php/writing-secure-php-1/
<br />
error_reporting(E_ALL);
ini_set("display_errors", 1);

Offline zachatk1Topic starter

  • Irregular
  • Posts: 38
    • View Profile
Re: Game Plan
« Reply #2 on: September 02, 2010, 09:49:24 AM »
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)


Offline MiCR0

  • Enthusiast
  • Posts: 113
    • View Profile
Re: Game Plan
« Reply #3 on: September 02, 2010, 10:05:03 AM »
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

Offline zachatk1Topic starter

  • Irregular
  • Posts: 38
    • View Profile
Re: Game Plan
« Reply #4 on: September 02, 2010, 10:15:15 AM »
Alright thanks!

I thought there had to be some sort of table method because it is always changing.

Offline zachatk1Topic starter

  • Irregular
  • Posts: 38
    • View Profile
Re: Game Plan
« Reply #5 on: September 02, 2010, 01:40:20 PM »
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


Offline ignace

  • Guru
  • Freak!
  • *
  • Posts: 5,093
  • Gender: Male
    • View Profile
Re: Game Plan
« Reply #6 on: September 02, 2010, 02:25:27 PM »
For projects like these it may help to use wire-frames. This could be an example for the bike-shop:

« Last Edit: September 02, 2010, 02:26:10 PM by ignace »
Developer from Belgium, Vlaams-Brabant

Offline zachatk1Topic starter

  • Irregular
  • Posts: 38
    • View Profile
Re: Game Plan
« Reply #7 on: September 02, 2010, 04:40:28 PM »
Boy that sounds a little difficult. I think I want to get it working first before I do any formatting and display. I need my previous question answered first on how to do the PHPMyAdmin thing.

Offline ignace

  • Guru
  • Freak!
  • *
  • Posts: 5,093
  • Gender: Male
    • View Profile
Re: Game Plan
« Reply #8 on: September 03, 2010, 01:22:07 PM »
Boy that sounds a little difficult.

Drawing lines on a piece of paper is difficult?
Developer from Belgium, Vlaams-Brabant