You are here: Re: quick question « PHP Programming Language « IT news, forums, messages
Re: quick question

Posted by Sanders Kaufman on 11/21/06 19:15

Auddog wrote:
> After starting to work with PHP, I have a question on others programming
> preferences. I usually create multiple pages for user input, 1 page for the
> form and 1 page for the insert and then a redirect. I have noticed thru
> several tutorials on the web that most are created pointing back to
> themselves
>
> I.E.
> if(isset($_post['submitted'])) {
>
> Is there a preferred way? Other than the obvious, it's all on one page, is
> there other benefits to the one page setup?


Either way is just fine.
I like to put it all in ONE file for manageability
and to avoid spaghetti code.

In some cases, I use separate files to reduce server
load. For example, I'll have a static HTML page
that contains the form, and then it submits to a PHP
page to process the data. That way, even if a
zillion people view the form - only the ones who
actually submit it will use the additional server
load required to process PHP.

 

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

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