You are here: Re: organizing code and folder structure « PHP Programming Language « IT news, forums, messages
Re: organizing code and folder structure

Posted by frothpoker on 08/18/06 12:11

You need to be a bit clearer about what you are trying to achieve here;
Does each team sub-domain contain the same details (e.g. players,
contact details, forms to input scores, pages to see results of
previous matches etc...)

If so there is no need to generate a whole series of pages for each
team. Each page can use a template and drag the relevant data from a
database (PHP and MySQL are perfect for this) You just need to be able
to identify the team that the page is being generated for.

If on your main page you are going to list all of the teams and allow
the user to select one with a hyper-link then you can use HTTP_GET_VARS
to drag parameters from the URL.

See my site www.frothpoker.co.uk for an example of how this works:-

The League tables builds a HREF URL in php, to ../PlayerResults.php
with two parameters on the end (the bit after the '?') These parameters
show the record ids in the database for the player and the event.

In the receiving page, these are extracted using HTTP_GET_VARS and then
used to generate the relevant data from the database for ONLY that
Player and that Venue. One php file = 80+ different page displays
depending on the selection made.

In this instance your team specific page URL would be

http://www.soccerteamonline.com/?team=teamname

If you wanted http://www.soccerteamonline.com/teamname then you would
need to create a single page for each team that did a redirect to
http://www.soccerteamonline.com/?team=teamname. If you were really
cute you could get PHP to write the page for you when the team was
created.

If you are going to allow them to select a team from a drop down list
then you would use form method =POST and $_POST[] to retrieve the form
details.

If you have no idea what I'm talking about, then maybe you need to
start smaller and learn a little more about how PHP works and what it
can and can't do

Obiron.


Tarscher wrote:
> Hi all,
>
> I 'm building a website that provide services for soccer teams. When a
> user (team) signs up I want to give him some personal space like
> http://www.soccerteamonline.com/teamname where www.soccerteamonline.com
> is my registered domain and teamname is the name chosen by the user. I
> want to have one singel code base meaning that I don't want to copy my
> code to every new account. Can someone please give me some advice on
> how to achieve this since I really don't have an idea on how to do
> this.
>
> Thanks in advance
> Stijn

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация