SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Categories!

  1. #1
    SitePoint Member
    Join Date
    Oct 2004
    Location
    Stockholm/Sweden
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Categories!

    I go to one page in the admin-system and adding a "main category", then I go to another there a select-list will appear with the "main categories" and in
    a text-box I write the "under-category".
    How should the PHP-code look and how about the data-tables, how many do I need?

    Best regards,
    Rikhard

  2. #2
    SitePoint Addict sinapra's Avatar
    Join Date
    Sep 2004
    Location
    secunderabad
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you need only one table for this.
    catId, catname, catdescription, price, etc.
    else you can go for two tables:
    1. catid, catname,catdescp
    2. itemid, catid, itemname, itemdesc.

    means each item belongs to a category. hence make a list of category and enter the data. say car is a category, the items are : ford, honda, suzuki, porsche.

    then you have two forms.
    1. entry form where you enter data :
    2. form where you can see the details or make a search.

    you need to do connection with your database, then write the query and retrieve the data as you need. There are other questionaires in the forum where you can find the connection string and other helps.
    Regards

    Its Great to work and Be Merry!!!!!!!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •