www.webdeveloper.com
Results 1 to 6 of 6

Thread: Category in PHP

  1. #1
    Join Date
    Apr 2014
    Posts
    6

    Category in PHP

    Hi mate,

    I need a help to develop a website with PHP basis. I want to make website with some category on it. Any help would be appreciate.. Thanks

  2. #2
    Join Date
    Mar 2012
    Posts
    1,256
    What do you mean by "category"? Also you need to be more specific as to what problems you are having with PHP. E.g.
    - Do you want to know how to install a PHP server on your PC for development purposes?
    - Do you want to access the development environment across a LAN?
    - Do you want to know where to look for a PHP tutorial?

  3. #3
    Join Date
    Apr 2014
    Posts
    6
    I'm sorry if I'm not clear. I mean I want to build a php website look like wordpress. There are latest post on homepage. And they are in the different category. How can I make post with different category in php?

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,176
    One possible solution: just use WordPress.

    If you feel you need to build your own solution from scratch, then you need to start by learning/understanding relational databases, as you'll probably need a post table, a category table, and a post-to-category relation table. If none of that makes any sense, then it's time to Google "relational database" and "database normalization" until it does.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  5. #5
    Join Date
    Apr 2014
    Posts
    6
    Sure I can just use wordpress. But I'm interested to learn PHP so I can built my own script. Thanks NogDog for your suggest

  6. #6
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,176
    How are your database skills/knowledge? You'll need at least a halfway decent understanding of relational databases, and then come up with a database design that will support, at a minimum, a table to store "posts", a table for "categories", and a table that relates posts to categories (assuming a post could conceivably belong to more than one category). Based on that design, you would then develop the DB query (SQL) to pull the latest post from the DB (by category would require a table join or two), and then develop the PHP code to execute that query and display the results on the page as/where needed.

    So, now you break that down into separate tasks, figure out what which ones you don't yet know how to do, research them, and start building your app -- as modularly as reasonably possible so that you can continue to focus on one building block at a time.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles