Autofilled PHP Forms
Subject:   Seperating PHP from HTML
Date:   2006-04-27 04:09:01
From:   JuddMuir
I'm about to try your code for the form-filling, as I like the simplicity of the idea. You said that you like separating application logic (PHP code) from display (HTML) as much as possible - I'd like to apply this principle to the webpage as a whole.

Normally my PHP classes have a render method that generates the HTML, as I am doing the site top to bottom. However, on the project I am currently working on, I'd like to be able to let a designer do the HTML and CSS separately. So my question is, what have you found to be the best method to keep HTML out of PHP?

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Separating PHP from HTML
    2006-04-28 16:25:39  GavinAndresen [View]

    We use Smarty templates extensively at Gravity Switch; just about all the output stuff (HTML pages, text of email messages) is put into Smarty templates and fetched by the PHP code.