Tag Archives: php profile

How to Code PHP Part 2

Welcome to the second part of the How to Code PHP Tutorial. In this article I’ll show you the rest of the basics of using the PHP Engine. I’ll cover the following:

  • IF Statements
  • SWITCH Statements
  • FOR Loops
  • WHILE Loops
  • DO WHILE Loops
  • Including Files
  • Creating Functions
  • What Does Scope Mean?
  • Date and Time Functions
  • How to Send Email
  • Accessing Databases

Continue reading How to Code PHP Part 2

How to Code PHP Part 1

Do you want to learn How to Code PHP? Get your thinking caps on and let’s start cranking the PHP Engine.

PHP is a programming language that allows you to process and react to user actions on your website. While JavaScript allows you to process actions directly on a visitors computer, PHP requires that actions are processed on the server in which your website resides.

PHP is most commonly used to access databases on the server that hosts your website. Please read my SQL Tutorial before you read this article, or you may get lost. This tutorial will cover most all you can accomplish with PHP, but will very specifically cover how to interact with a database with PHP.

The Basics of PHP

Like my other tutorials, I will provide you with working PHP Sources you can use, but for now I’ll focus on the basics.

You can embed PHP code directly in your web pages by surrounding the code with an opening <?php and closing tag ?>. You also want to give your web page the PHP extension .php, when you embed PHP code in a web page. Continue reading How to Code PHP Part 1