Ebook Sample Content Preview:
Welcome to the world of programming!
First of all, I would like to congratulate you on your decision to learn one of the easiest yet powerful programming languages available – PHP.
Web Developers use PHP to create interactive, dynamic websites while making it easy to update and maintain, not to mention, prompt your visitors to purchase, join a list or even tell a friend.
What is PHP And Why Should I Learn It?
PHP has been around for over 12 years, first coming onto the scene in 1995 by a freelance software developer, Rasmus Lerdorf. He initially used PHP by creating a script that retained a log of all of the visitors that landed on his webpage.
His script would feature information on how many visits his site received and other detailed information about his website stats.
As you can imagine, It didn’t take long before he started to receive emails and messages asking how he was able to do this, and because of the overwhelming interest in his scripts, he worked to develop PHP into what is now one of the most popular and widely used programming languages on the Internet.
Throughout the years, I have seen a number of webmasters ask the question as to why they should learn PHP. In truth, there are so many benefits to learning how to implement the power of PHP into your websites that a list of potential uses would take up this ebook alone. From managing pages and updating websites quickly, to creating commercial scripts for profit, the sky is truly the limit.
Think of all your favorite websites, WordPress, Paypal, eBay or perhaps FaceBook.
They all use the power of PHP to make their website run smoothly and efficiently.
Getting Started
First of all, you will need to have access to a web server that is set up to work with PHP. Don’t let this scare you. Typically, most of the web hosting companies today will offer PHP support, so you shouldn’t have a problem finding one.
HostGator.com is an affordable solution, as is EagerHost.com. Both of these hosting companies fully support PHP.
Also, I want to make it clear that PHP is not a difficult language to learn, even if you have never tried to program before. In fact, if you are completely new to programming, PHP is often the easiest way to get started.
In the world of the wide web, there are two general types of coding languages: “Server side” and “Client side”. This means that one type is run on the web server itself, and the other is run in your web browser.
PHP happens to be a server side language. All of the processing is done on the web server itself, and the result is delivered to your web browser as HTML (which, by the way, is a Client side language). To begin, php code looks like this:
? closes your code
In fact, PHP always begins with
If your code is not contained within these tags, the PHP engine on the web server will display errors or ignore it all together.
Another important point to make is that pages that contain php must end in .php in order to work correctly. This means if you create an index page that contains php code, it must end in .php such as index.php, not index.html. If you use .html, the webserver will once again ignore it. (There are a few exceptions to this but we will cover that in a later chapter).
You should also know that PHP can be embedded into HTML, and you don’t have to have raw PHP code in a PHP file, you can always switch between HTML and PHP, all on one page, as long as the page extension is .php (index.php, etc).
- File Size:408 KB
- License: Master Resell Rights
- Category:Ebooks
- Tags:2008 Ebooks Master Resale Rights