Functions



PHP Functions:

·         PHP Built-in Functions

·         User Define Function

 

Create a PHP Function: A function will be executed by a call to the function.

 

Example: A simple function that writes my name when it is called:

<?php
          function writeName(){
echo "Kai Jim Refsnes";
}
echo "My name is ";
writeName();
?>

PHP Forms and User Input: The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input.

 

PHP Include Files: Assume that you have a standard header file, called "header.php". To include the header file in a page, use include/require:

<?php include 'header.php'; ?>
<h1>Welcome to my home page!</h1>
<p>Some text.</p>

Loading
Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Flying Twitter Bird Widget By ICT Sparkle