Knowledge7

The Linux and Mobile Solution Provider

  • About
  • Training
  • Services
  • Clients
  • In the news
  • Blog
  • Contact Us
You are here: Home / Topic / Using filters and templates in PHP

Using filters and templates in PHP

This topic is part of our Web Development with PHP and MySQL training

An order form can be added to the website created before in order to transform it into an e-commerce website. When someone orders a phone, the order should be saved to a text file. A reporting facility can also be added.

Filters were recently added to PHP in order to provide sanitization as well as validation facilities. The work to do is to make sure that any data being submitted from the order form is properly sanitized and validated. This helps in making the web application more secure.

Usual PHP scripts mix both programming elements (the PHP) with HTML markup. This tends to make the web application less maintainable and can prevent web designers and programmers from working at the same time.

One common solution to that problem is to use a templating engine like Smarty. This engine allows the programmer to separate PHP from HTML markup while increasing flexibility. The work to do is to rewrite the web application to use Smarty.

This topic is part of our Web Development with PHP and MySQL training

Our forthcoming training courses

  • No training courses are scheduled.

Leave a Reply

Your email address will not be published. Required fields are marked *

Looking for something?

Want to know more?

Get our newsletter

Discover the latest news, tips and tricks on Linux, the Web and Mobile technologies every week for FREE

This work is licensed by Knowledge7 under an Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.