Basic PHP Syntax

A PHP scripting block always start with <?php and end with ?>. A PHP scripting block
can be placed anywhere in the document.

On servers with shorthand support enable you can start a scripting block with <? and end

with  ?>.


For maximum compatibility,we recommend that you use the standard form (<?php) rather
than

<?php


?>


A PHP file normally contains HTML Tags,just like an HTML file,and some PHP scripting
code.

Below ,we have an example of a simple PHP script which sends the text “Hello World” to
the browser:


<html>
<body>


<?php
echo “Hello World”;
?>


</body>
</html>


Each code line in PHP must end with a semicolon.The semicolon is a separator and is use
used to distinguish one set  of instructions from another.

There are two basic statements to output text with PHP: echo and print.In the example
above we have used the echo statement to output the text “Hello World”.

Note:
The file must have a .php extension.If the file has a .html extension,the PHP code will not
be executed.

Posted in Uncategorized | Leave a comment

PHP+MySQL


*PHP combined with MySQL are cross-platform
(you can develop in Windows and serve on a
Unix platform)

Note:
PHP code is executed on the server,and tha plain HTML result
is sent to the browser.

Posted in Uncategorized | Leave a comment

Why is MySQL

 

*MySQL is a databse server

*MySQL is ideal for both small and large aaplications

*MySQL supports standard SQL

*MySQL compiles on a number of platforms

*MySQL is free to download and use

Posted in Uncategorized | Leave a comment

Why PHP?


*PHP runs on different platforms (Windows,Linux,Unix,etc.)
*PHP is compatible with almost all servers used today (Apache,IIS,etc.)
* PHP is FREE to download from official PHP resource http://www.php.net/
*PHP is easy to learn and runs effeciently on the server side
Posted in Uncategorized | Leave a comment

What is PHP?

CLASS#1

* PHP stands for PHP:Hypertext
Preprocessor


*PHP is  a server-side scripting
language,like ASP.

*PHP scripts are executed on the server


*PHP supports many databases
(MYSQL,Informix,Oracle,Sybase,Solid,PostgreSQL,Generic ODBC,etc.)

*PHP is an open source software.

*PHP is free to download and use.

What is PHP File?


*PHP files can contain text ,HTML tags
and scripts

*PHP files are returned to the browser as
plain HTML


*PHP files have a file extension of
“.php”,”.php3″, or “.phtml”

Posted in Uncategorized | Leave a comment