You will notice that most of today’s websites have dynamic web pages for login, photo management, forums, blogs, shopping carts, etc. These dynamic web pages are often developed using a scripting language called PHP.
When this language was first developed by Rasmus Lerdorf in 1995, the acronym stood for Personal Home Page. With the expansion of PHP’s applications over the years as an open source code, the term PHP now expands to the more apt Hypertext Preprocessor.
Why Learn PHP?
*It is a simple language that even novice developers can understand and implement
* It is a quick and efficient programming language.
*Since this technology runs on the server side, no special browsers or plug-ins are needed to execute the PHP scripts.
*It can be easily embedded into HTML code and integrated with the MySQL relational database management system (RDBMS). PHP also has good connectivity with various graphics, encryption, and XML libraries using extensions.
*A script installer automatically installs the PHP applications on the web hosting account without the need for any manual intervention.
*It is an open source code, so it is possible for a PHP developer to find an existing script for a particular functionality. This encourages reuse and saves development time and effort.
*The top social media giant Facebook, the information resource Wikipedia, and popular content management systems like Joomla and Drupal are written in PHP.
What do I Need to Get Started?
To get create your first website using PHP, you’ll need a few things:
1. Software for writing HTML / PHP. Options include:
- Any text editor will do (Notepad is fine, also see Notepad++).
- Commercial software: Dreamweaver.
- Great free HTML editor: Kompozer
2. Domain name – approx $10/yr – I recommend Namecheap.com
3. Hosting Space A basic webhosting plan that supports PHP.
Personally, I use Web Hosting Hub for my hosting provider. Really, most shared hosting plans under $10/mo will do. Find a good deal.
4. Patience and willingness to learn /troubleshoot.
5. Optional: FTP software.
Making a Simple Web Page with HTML and PHP
1. Using Notepad, Dreamweaver, Kompozer or other text editor, create a new document. save as index.php
2. Add this code to file: <html> <title>My First PHP Page</title> <body> <?php echo '<p>Hello World</p>'; ?> </body> </html>
3. Make sure there is no other text or code in the the document and Save.
4. Upload to your website server (hosting). This is usually done via FTP. Your hosting provider should have provided you with instructions.
5. Point your web browser to your domain name. If everything went correcly, you will see your very first live php web page, congrats.
If it didn’t work, please refer to your hosting companies directions/FAQs on FTP and uploading files.
6. Too Easy? Try something a little more complicated.
Q. What’s the difference between PHP4 vs PHP5?
A. PHP4 is the older version of the PHP web-programming language. Since it has been around for a while, it is a stable and reliable version for hosting your website. Many website designers and owners might want to take advantage of the new features in PHP5. These include:
* Object-Oriented Programming (OOP) features like abstract classes and unified constructors/ deconstructors
* A standard PHP library (SPL)
* Type hinting
PHP5 is backward-compatible with PHP4 to a large extent. Keeping in mind that web designers mostly use one or both of these two versions for their web pages and apps, many PHP hosting providers offer a dual PHP4/PHP5 hosting environment. The web hosting account makes it quite easy to upgrade the PHP version for a website. The new PHP6 version is under development and is due for release soon.
Q. What is PHPMyAdmin?
A. The interfacing of PHP hosting with MySQL can be managed more efficiently through an administration tool called PHPMyAdmin. This tool supports the execution of advanced dynamic websites on web servers. Like PHP and MySQL, PHPMyAdmin is also an open source freeware, and it is developed using the PHP programming language. It consists of a graphical interface to carry out various actions on the MySQL database tables, manage database access for all users and facilitate the database import from backup.
http://www.phpbuddy.com/ – Excellent source for PHP coding tutorials and examples.
http://www.htmldog.com/guides/ – HTML / CSS for Beginners.