Tuesday, October 27, 2015

PHP GET & POST METHODS | phpeasylearning.tk

There are two methods to send information from clients (Browser) to Web Server:
  • GET METHOD
  • POST METHOD

GET METHOD

In GET method the form data can be requested to collect information after submit button clicked form with method=”GET”.

The example below shows a HTML form with two input field and button to send the information to “get_welcome.php

<html>
<body>
<formaction="get_welcome.php"method ="GET">
     Full Name: <inputtype="text"name="fname"/><br/>
     Username : <inputtype="text"name="uname"/><br/>
<inputtype="Submit"/>
</form>
</body>
</html>

get_welcome.php

<html>
<body>
<?php
if($_GET["fname"]||$_GET["uname"])
{
echo"Welcome ".$_GET['fname']."<br />";
echo"Your Username is “.$_GET['uname'];
exit();
}
?>
</body>
</html>

For output copy above codes and run the script.
In the example above when user fill the form and click submit button, the data is sent to PHP file named “get_welcome.php” for processing. The method used in that form is “GET” which is used to send form data.
In GET method When the submit button clicked the information (name/value pairs) appeared in the URL and are visible to everyone

/PHP_Examples/get_welcome.php?fname=namevalue&uname=unamevalue

The question marks“?”character separates the page and form information or variables and information (name/ values) are separated by ampersand “&”character as you can see in above URL.

HTTP POST Method

In POST method the form data can be requested to collect information after submit button clicked form with method =”POST”. This method is used widely. The information sent to server using HTTP request.
We can take same above “GET Method” example for POST Method


continue reading...


Monday, September 28, 2015

What is Syntax in PHP | PHP Syntax Overview | phpeasylearning.tk


PHP Tags:

A basic PHP syntax which start with <?php and end with ?>. This is universal php tags used for proper and correct interpretation.
<?php………?>
 
A .php file basically contains HTML tags and some php scripts to create a simple web page.
 

Short-open Tags:

This tag allows you to use the short style opening tag for php code block, to use this tag you have to enable or on it in your php.ini
 <?………?>
 

read more about other tags..

 

Understand the PHP Variables Types, PHP Tutorials for Beginners Easy learning | phpeasylearning.tk


Storing information or Assigning a value in PHP program is done by using Variables.
In PHP all variables are declare with leading dollar sign ($)

<?php
$apple="red";
?>

PHP Supports total of Eight Data Types:
See All Types

 

Strings in PHP | PHP Tutorials



The PHP Strings can be considered as important part of PHP. The string is series of characters which can be used in function. To use string first you have to specify it.

In PHP Strings is simply line of characters in single or double quotes like “Hello World!” or ‘Hello World!’ you can write any text in these quotes.

$my_string="I love PHP!";// Double Quotes
$my_string='Hello World!';// Single Quotes

Read More..

Thursday, September 24, 2015

Understand the user defined Function in php | PHP Functions | phpeasylearning.tk





















A function is series of code that take inputs or as parameter and does some processing and returns the outputs..
User defined Function in PHP:
 PHP Allow you to create your own function.
A User defined function must be declare with name ‘function’
 <?php
 function userfunction(){
             echo"User Defined Function";
}
             userfunction();
?>

read more..

 

Tuesday, September 22, 2015

Learn how to install php, PHP Installation | PHP Tutorial for Beginners | phpeasylearning.tk

PHP Installation






















How to install php in your system?
To start developing web based application using PHP you need to install main three components in your computer system Such as: continue reading..

Saturday, August 1, 2015

What is php/php script actually...? | phpeasylearning.tk

The Php Hypertext Preprocessor (php) is scripting language that helps you to create dynamic & interactive web pages and interact with database. It is free widely-used interactive tools to develop web based applications... continue reading..

Learn php script for beginners easy and simple | phpeasylearning.tk


 









phpeasylearning.tk is the website of free php tutorials where you can learn and read php script very easily with examples for every chapter of php.. 

phpeasylearning.tk