Intoduction To PHP: Subject Name: Software Lab-X1 (Web Technologies) Subject Code: Mca 506
Intoduction To PHP: Subject Name: Software Lab-X1 (Web Technologies) Subject Code: Mca 506
PHP is a server side scripting language that is embedded in HTML. It is used to manage dynamic
content, databases, session tracking, even build entire e-commerce sites.
It is integrated with a number of popular databases, including MySQL, PostgreSQL, Oracle, Sybase,
Informix, and Microsoft SQL Server.
PHP is pleasingly zippy in its execution, especially when compiled as an Apache module on the Unix
side. The MySQL server, once started, executes even very complex queries with huge result sets in
record-setting time.
PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4 added
support for Java and distributed object architectures (COM and CORBA), making n-tier development
a possibility for the first time.
PHP performs system functions, i.e. from files on a system it can create, open, read, write, and close
them.
PHP can handle forms, i.e. gather data from files, save data to a file, thru email you can send data,
return data to the user.
You add, delete, modify elements within your database thru PHP.
Using PHP, you can restrict users to access some pages of your website.
Characteristics of PHP
Five important characteristics make PHP's practical nature possible
Simplicity
Efficiency
Security
Flexibility
Familiarity
ROOT ELEMENT
<BOOK
STORE>
ATTRIBUTE
ELEMENT
CATEGORY
<BOOKS>
<LANGUAGE>
ELEMENT
ELEMENT
AUTHOR
TITLE
W.STALLING
PHP
ELEMENT
ELEMENT
YEAR
2003
PRICE
OUTPUT:
OUTPUT:
OUTPUT:
OUTPUT:
OUTPUT:
OUTPUT:
OUTPUT:
}
$a=5;
get ($a);
echo "<br>$a";
?>
</body>
</html>
OUTPUT:
UNIV.ROLL NO: 1504179
OUTPUT:
UNIV.ROLL NO: 1504179
OUTPUT:
UNIV.ROLL NO: 1504179
OUTPUT:
UNIV.ROLL NO: 1504179
OUTPUT:
Write a program to print odd numbers upto 100 using for loop.
UNIV.ROLL NO: 1504179
OUTPUT:
Write a program to print even numbers upto 100 using for loop.
UNIV.ROLL NO: 1504179
OUTPUT:
UNIV.ROLL NO: 1504179
OUTPUT:
OUTPUT:
OUTPUT:
UNIV.ROLL NO: 1504179
OUTPUT:
UNIV.ROLL NO: 1504179
OUTPUT: