Introduction to PHP and MySQL – Creating Database-Driven Websites
Introduction to PHP and MySQL – Creating Database-Driven Websites PHP is an open-source server-side scripting language used for the creation of dynamic web pages for e-commerce and other web based applications. It is also one of the most popular server-side languages commercially used today. With consistent fast performance, high reliability and ease of use, MySQL has become the open-source database of choice for many organisations. Together, these two technologies provide you with a simple, free and powerful platform for building dynamic, database-driven web applications.
Introduction to PHP and MySQL – Creating Database-Driven Websites This hands-on practical course is designed to enable web developers and others with limited programming experience to build dynamic e-commerce websites using the PHP programming language and MySQL database. An understanding of basic HTML/XHTML is assumed.
Introduction to PHP and MySQL – Creating Database-Driven Websites Understanding PHP Basics Introducing PHP Using Variables and Operators Controlling Program Flow Working with Arrays Using Functions and Classes
Introduction to PHP and MySQL – Creating Database-Driven Websites Understanding MySQL Basics Relational Database Design Structured Query Language Data Manipulation Language Simple and Advanced SQL Queries MySQL Administration Tools Creating a Content Management System
Introduction to PHP and MySQL – Creating Database-Driven Websites Working with Data from Other Sources Working with Files and Directories Working with XML Working with Cookies, Sessions and Headers
Introduction to PHP and MySQL – Creating Database-Driven Websites Security and Troubleshooting Handling Errors Securing PHP Extending PHP
Introduction to PHP and MySQL – Creating Database-Driven Websites PHP Hypertext Preprocessor (recursive acronym) In use in over 20 million websites and over a third of the world’s Web servers Developed by a worldwide community of volunteers and freely available at no cost Developed by Rasmus Lerdorf 1994 – called PHP/FI Further improved by Andi Gutmans and Zeev Suraski 1997 – PHP 3.0
Introduction to PHP and MySQL – Creating Database-Driven Websites 2008 – ‘Netcraft’ survey showed PHP in use on over 30 million websites We are using PHP 5.3xxx Latest version is PHP 6.0
Introduction to PHP and MySQL – Creating Database-Driven Websites PHP – Unique Features Performance – fast execution of scripts Portability – available for UNIX, MS Windows, Mac OS and OS/2 – and portable between platforms Ease of Use – “Simplicity is the ultimate sophistication” plus exhaustive documentation Open Source (like MySQL) – Any developer, anywhere, can inspect the code tree, spot errors and suggest possible fixes. The result is a stable, robust product where bugs are rapidly resolved.
Introduction to PHP and MySQL – Creating Database-Driven Websites PHP – Unique Features Community Support – The results of which include the libraries of extensions - PEAR (PHP Extension and Application Repository) and PECL (PHP Extension Community Library) Third-Party Application Support – Support for a wide range of databases – including MySQL, PostgreSQL, Oracle, Microsoft SQL Server. XML support And it doesn’t stop there…..GIF, JPEG, PNG formats, SMTP, IMAP, POP3, SOAP and REST protocols. PHP can even manipulate PDF documents!!
Introduction to PHP and MySQL – Creating Database-Driven Websites PHP – Client-Server Framework
Introduction to PHP and MySQL – Creating Database-Driven Websites PHP – Development Environment Base operating system (OS) and server environment – Linux, Windows Web server (usually Apache on Linux or IIS on Windows) PHP interpreter to parse and execute PHP code – and return results to the web server Database engine (for example, MySQL) PHP is executed on the server cf. client/browser-side scripting – and only the output is sent to the browser Thus the code is completely independent of browser quirks!!
Introduction to PHP and MySQL – Creating Database-Driven Websites PHP – Sample Applications phpMyAdmin (www.phpmyadmin.net) = A PHP-based administration tool for MySQL phpBB (www.phpbb.com) = PHP-bases online bulletin board Gallery (www.gallery.meanlto.com) = PHP-based digital photo archive PoMMo (www.pommo.org) = mass mailing application Smarty (www.smarty.net) = PHP-based framework of templates for separating business logic from user imterface Wordpress (www.wordpress.org) = Weblog publishing tool Squirrelmail, eZ Publish, Mantis……..
Introduction to PHP and MySQL – Creating Database-Driven Websites View phpinfo() on the web server host we will be using (www.bedford-computing.co.uk/test.php)
Introduction to PHP and MySQL – Creating Database-Driven Websites