Friday, June 24, 2011

Variables: Learn PHP Tutorial: 5. Variables - Learningyoutube.com

Learningyoutube.com php tutorial.
Now were ready to show the full dynamic power of PHP. Variables let you store, modify, process and display information in new and interesting ways. Theyre the short-term memory of web programming. 
Watch php tutorial:

Sunday, June 5, 2011

PHP Tags

PHP is a web scripting language which means it was desgined to work with HTML. You can easily embed PHP code into your HTMl code. Hmmm! Nice but how do we do that? Simple. When writting php code, you enclose your PHP code in special php tags. This tells the browser that we're working with PHP. See below.

Installing PHP on Windows

Installing PHP is easy. You can install PHP on your computer easily with WAMP5. WAMP5 is an open source application which comes with with PHP5, Apache web server, MySQL database and phpMyAdmin (mysql database administration program). You can install these items on your windows machine using WAMP5. You can read more about WAMP5

Introduction to PHP

PHP stands for "PHP: HyperText Preprocessor". PHP is a server side scripting language for making logic driven websites. Ever wonder how they made that "contact us" form on their site, which sends out emails? Well, they used PHP. Or, how they made that image upload tool? Well, they used PHP. PHP written scripts can use databases to keep track of your customer's and visitors activities on your site, send out periodical newsletters to your subscribers, upload files or images and drive the content on your site dynamically. The possibilities are endless. Most of the social networking websites you visit are writing in PHP. Yep! PHP is that powerful. Learning The Basics of PHP will help you tremendously in your Webpage development.

Tuesday, May 31, 2011

PHP MySQL Tutorial

Connect to MySQL

 
Interacting with MySQL makes PHP a far more powerful tool. In this tutorial we will go through some of the most common ways PHP interacts with MySQL. To follow along with what we are doing, you will need to create a database table by executing this command:

 CREATE TABLE friends (name VARCHAR(30), fav_color VARCHAR(30), fav_food VARCHAR(30), pet VARCHAR(30));
 INSERT INTO friends VALUES ( "Rose", "Pink", "Tacos", "Cat" ), ( "Bradley", "Blue", "Potatoes", "Frog" ), ( "Marie", "Black", "Popcorn", "Dog" ), ( "Ann", "Orange", "Soup", "Cat" )

This will create a table for us to work with, that has friends' names, favorite colors, favorite foods, and pets.

The first thing we need to do in our PHP file is connect to the database. We do that using this code:

 <?php
 // Connects to your Database
 mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error());
 mysql_select_db("Database_Name") or die(mysql_error());
 ?>

Of course you will replace server, username, password, and Database_Name with the information relevant to your site. If you are unsure what these values are, contact your hosting provider.

Friday, February 25, 2011

Tutorial Overview

This tutorial is aimed at the PHP novice and will teach you PHP from the ground up. If you want a drive-through PHP tutorial this probably is not the right tutorial for you.
Remember, you should not try to plow through this tutorial in one sitting. Read a couple lessons, take a break, then do some more after the information has had some time to sink in.

What You Should Know

Before starting this tutorial it is important that you have a basic understanding and experience in the following:
  • HTML - Know the syntax and especially .
  • Basic programming knowledge - This isn't required, but if you have any traditional programming experience it will make learning PHP a great deal easier.