Jump to content


Photo

What's more organized?


  • Please log in to reply
3 replies to this topic

#1 tleisher

tleisher
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 08 September 2006 - 12:55 AM

When creating a large PHP script, should I just have a ton of if ($_GET["page:) = "register") again and again in one big index.php file, or should I craete various files like index.php, register.php, login.php, etc?

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 08 September 2006 - 01:02 AM

Personally, I like lots and lots of pages all of which use a common included header and a common included footer.
Legend has it that reading the manual never killed anyone.
My site

#3 tleisher

tleisher
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 08 September 2006 - 01:06 AM

That's the way I have things setup now, but I was thinking of going something like this:

index.php?page=members&sortby=C

Rather then having a sepate file like this:

members.php?sortby=C

#4 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 08 September 2006 - 01:30 AM

Personally I think its easier to go through multiple pages of code rather than a HUGE single document of all the code.

I look at my scripts and I fid it easier to go through 100-200lines as opposed to 500+ lines to find that missing curly brace.

It looks alot neater too, or so I think.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users