Implementing design & GUI


After you have completed your script how do you go about implementing a design or visual GUI into your script.

As far as I know there are two methods.

Integrate HTML into PHP
Integrate PHP into HTML

What method do you use and is there other methods?

There are many more methods than those two.

For sufficiently complex applications, the MVC pattern is popular. Most PHP frameworks implement it to some degree. Your database logic are in model classes, business logic in the controller, and the interface in the view. The view templates contain only minimal PHP like echo statements and simple loops for output; the logic is in the controller class methods and the view only gets access to the variables it needs for the UI.

For concrete examples, pick a framework and go through the beginners tutorial: