Forum Moderators: coopster

Message Too Old, No Replies

Best Way Around PHP Based Sites

         

Bradster

2:34 am on Jun 2, 2008 (gmt 0)

10+ Year Member



I've done a lot of researching and have a small amount of knowledge with includes, sessions, logins, password encrypting, mysql databases and all the usual PHP lingo.

I'm looking to make a website for a gaming clan, I need to have a login system and some other various clan modules. I was wondering what the best way around that is?

I'm finding it really hard to explain what I mean, however, does a site like this usually have a main index page that pulls everything in with includes / requires, or is it something else?

Most of the sites I see have urls like "index.php?id=news&cat=2", I know how to do these sort of links but what is the best way to do it.

I'm not being very clear lol, but perhaps someone will be able to find me a resource I can read from, thanks in advance.

cameraman

6:34 am on Jun 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, Bradster!

In and of itself, I don't think there's usually a whole lot of value to making a single page do a whole lot of work with includes. Certainly there are applications for it - I have a site that is set up that way because I want to very rigidly control the flow - but in general, I think it's more trouble than it's worth. If you're set on taking that approach, I would recommend that you utilize one of the templating systems; it will at least make the page a little easier to maintain in the future.

That's not to say that one page can't perform more than one function, but liken it to the drawers in your kitchen; the silverware drawer may have forks, spoons, and knives in it but not many keep their aluminum foil there.

As to the query string parameters, the 'best way to do it' is to use it when you need to. Parameters such as those come in handiest when they're selecting records from database tables and the resulting page will look the same regardless of the specific record retrieved.

If you're doing an RPG site, for example, you may have a page that displays character data. You would likely design one page to display character attributes for any of the characters, specified with a query string parameter. Maybe you'd have them broken up by race, necessitating another parameter, etc. Whether you reuse the same page to display weapons depends on your style and how different the page layout may be. It wouldn't make much sense [to me] to also reuse the same page for player statistics or game schedules, but ultimately it's your aluminum foil.

You might find some good stuff in this forum's library [webmasterworld.com]. If you figure you've got the basics down then dive in! I've found that when I don't have clear direction on what I want something to look like, there's value in resorting to old-fashioned paper, with a sheet representing a web page; jot down what you want it to do and contain. If you get hit with mental blocks, just get enough down to get started, then as the creative juices turn tidal while you're working on page A, you can jot stuff down quickly on the papers for pages B-F.

Did any of that help? Like you said, you weren't terribly clear, so I was left to ramble...

netchicken1

7:25 am on Jun 2, 2008 (gmt 0)

10+ Year Member



Why reinvent the wheel?
There are a heap of great free message board systems, or CMS systems out there with all the bugs ironed out.

Bradster

9:49 am on Jun 2, 2008 (gmt 0)

10+ Year Member



Thanks Camerman, some useful stuff there :).

Netchicken, it's not reinveting the wheel as you say, it's learning how the wheel works :p.

It's not only me making a clan website, it's also for personal knowledge.