PHP (Hypertext Preprocessor) is a web development language, where you can develop and create small and big databases/applications with the help of MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc. PHP is a server side-scripting language like ASP. Learning PHP (Hypertext Preprocessor) can be fun and challenging. It is not that complicated but requires close attention. Here we will introduce only PHP and MySQL databases.
- What is PHP?: PHP stands for (Hypertext Preprocessor) but in the past it was abbreviated as (Personal Home Page). PHP interacts with HTML and is used inside HTML tags. PHP scripts are executed on the server and the result is shown on the browser to the user. A PHP file may contain text, scripts or HTML tags and the PHP files have the extension of ".php" ".php3" ".phtml."
- What is MySQL?: SQL is a database server and is ideal for both large and small applications. MySQL supports standard SQL and MySQL compiles on a number of platforms.
- How to start using PHP.: Before you code, you should install some software & programs to make the environment suitable for using PHP:
- Basic PHP syntax: A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed anywhere in the document. If shorthand is supported on the server, you can start a scripting block with <? and end with ?>. However, for maximum compatibility, I recommend that you use the standard form (<?php) rather than the shorthand form.
- Creating first program with PHP: Open Notepad or any text editor that best suits you and write the following block of code:
- <Html><head><title> My First PHP Programming</title></head>
- echo "Hello!! How To Do Things Readers"; //echo function prints text string on the screen
- Save the file with "myprogramm.php" and run on your computer through Apache Server.
You won't be able to see the source on selecting "View Source" from the browser, because all the scripts are executed on the server. The results will only be shown on the user browser.