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 *

7 + 4 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">