write php server side code



Write PHP server side code

In previous php tutorial we learnt to install php on windows. Now in this php tutorial, it’s time to write something in php  language. we will learn in this php tutorial how to write php programming code for develop simple web application.

We all know that the PHP language is an interpreted language, which written inside the HTML document or in external php file.

The PHP file save with .php extension instead of .html. The document is a HTML code page, we have to write our PHP code inside the HTML page or we can also create new .php page for PHP code.

We can only make web application (webiste) in php language, so we must have to design the page with html and write our server side php code inside the html page.

Here, we learn how to write PHP server side code with example.

Suppose, we have an index.php file such as below code.

<html>
<head>
</head>
<body>

<?php

/////write php code here

?>

</body>
</html>

As shows above example the php code written between this “<?php”  and  “?>”  tag.

We also write php code another ways like below :

<html>
<head>
</head>
<body>

<script language=”PHP”>

/////write php code here

</script>

</body>
</html>

All php server side code written in between script tag.

Leave a Reply

Your email address will not be published. Required fields are marked *