home

Php Typical Page Tutorial


The browser never sees a single line of PHP code. The PHP code is evaluated and converted in to HTML by the PHP interpreter before the web server returns the document to the browser. View-source in the browser will not reveal any PHP code. To run a PHP script you must save the script on a web server which has the PHP interpreter installed and correctly configured. The BUCS web server is an excellent testing ground for PHP scripts.

So let's see some actual PHP code...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>

<?php
echo " this is my output using echo command";
echo "<BR>";
echo "<B>my second line</B>";
?>

</body>
</html>

PHP code is embedded in to standard HTML documents. All PHP code must be placed between a starting <?php tag and an ending ?> tag - when the script is executed, the code between the two tags will be replaced by whatever is output by the PHP script. Output is generally achieved using the PHP echo command


Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

all rights reseverd by Cramerz.com©. web development by web design company DotPeak. hosting by HostBay
all contents on cramerz are the property of Cramerz.com. web design courses