[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] php and mysql



On Tue, 2004-06-15 at 15:03, Chris Johnson wrote:
> Anybody suggest a good read reference for starting PHP and mysql based
> websites?  I've got some pretty basic stuff to do (reading table entries
> from a table, creating new entries from forms based pages etc.)  I've got to
> a point where the scripts I'm downloading are OK but some need tweaking and
> my trial and error copy and paste technique leaves lots to be desired.  I'm
> learning but not as quick as I'd like to be.

Have a look at smarty.php.net and read about smarty templating. It's
worthwhile just to know that templating for php exists and is a very
good way of writing php web applications, even if it's not yet relevant
for the stuff you're doing. 

Essentially, you write "pure" php code which does all your database
access and other program logic and this goes in one file. In another
file goes the template code, which is mostly just html. The idea is to
separate the program logic and the design/layout. 

I mention it because I got a fair way into learning php whilst at the
same time writing a php app. The app got big and unwieldy and I then
spent a lot of time converting it into a templated architecture.

As for a book? I have one by Wrox publishing, and occasionally have used
it, but the web reference www.php.net is very good and I use that more
often.

Seb

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.