Published by: Sujan
Published date: 16 Jun 2021
PHP stands for Hypertext Preprocessor. It is a very popular and widely-used open-source server-side scripting language to write dynamically generated web pages. It was originally created by Rasmus Lerdorf in 1994. It was initially known as Personal Home Page.
Its scripts are executed on the server and the result is sent to the web browser as plain HTML. It can be integrated with a number of popular databases, including MySQL, PostgreSQL, Oracle, Microsoft SQL Server, Sybase, and so on. The current major version of PHP is 7.
There are lot more things you can do, they are:
The script executes on a web server. So before you start writing any program you need the following program installed on your computer.
You can either install them individually or choose a pre-configured package for your operating systems like Linux and Windows. Popular pre-configured packages are XAMPP and WampServer.
WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP, and a MySQL database. It will also provide the MySQL administrative tool PhpMyAdmin to easily manage your databases using a web browser.
The official website for downloading and installation instructions for the WampServer: http://www.wampserver.com/en/
Click on the WampServer icon somewhere on your Windows taskbar and select the "www directory". Alternatively, you can access the "www" directory by navigating the C:\wamp\www. Create a subdirectory in the "www" directory let's say "project".
Now open up your favorite code editor and create a new PHP file then type the following code:
Alternatively, you can access the "hello.php" file by selecting the localhost option and then select the project folder from the WampSever menu on the taskbar.
PHP can be embedded within a normal HTML web page. That means inside your HTML document you can write the PHP statements, as demonstrated in the following example:
{PHOTO}
A script starts with the tag.
The delimiter in the following example simply tells the engine to treat the enclosed code block as PHP code, rather than simple HTML.
{PHOTO}