Showing posts with label php course. Show all posts
Showing posts with label php course. Show all posts

Tuesday, March 19, 2019

PHP Registration Form using GET and POST Method

What is Form?
Form are classified PHP Course In Chennai into many types like registration form.
login form,request form,contact us form etc.A form is submitting your data to
the server. The form is getting the input from the user.

PHP $_POST

PHP post is used to collect the form data after submission of form in post method
PHP $_GET
PHP $_GET can also be used to collect form data after submission of form
in the get method.PHP Course and Certification


HOW GET Method Works?
1.Get method is used to PHP Training Institute in Chennai get the input data
from the user
2.we can also bookmark the Get method
after the submission of form.
3.Get method is use only String data type because the values are visible in the url.
4.It has high performance compared to POST.
5.the length of the values can be exceeded over 255 characters.


How POST Method Works?
1.the process of PHP Course and Certification POST method is happened
after the submission of input data.
2.the post method process are invisible to users.
3.the Post method will submit the data to the url
4.we can’t bookmark the submitted values.
5.the post method use many data types they are string,numeric and binary etc.


Attribute in Form:
Action attribute:the action attribute will specifies the url that will process the data
Method attribute:the method PHP Course in Chennai attribute will specify the
submitted type.


The Form uses HTML tags and the form tag is <form>...</form> and it also include
input Box,check box and radio button.


The form are used to collect the input of user and the check box are used to tick  the
relevant field and the radio button PHP Course in Chennai are used to mark
the relevant field.Form can be written in both php
and html tag,


Using PHP is the easiest way to write the code for form.with the help of get and post
method only The form action is performed.

Simple HTML Form

<html>
<body>


<form action="welcome.php" method="post">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>


</body>
</html>


Monday, March 4, 2019

PHP - Functions and Arrays

PHP has a wide range of power in the real-time world comes through a lot of
PHP Function and PHP has a built-in function. In PHP we can able to
create our own functions with the help of PHP Functions


PHP Functions:
A Function is a set of program or statements are used frequently in a program.
It won’t execute at the run time or page loads. A Function in PHP Course in Chennai
will only execute when the particular function call.


Basic Syntax of User Defined Function:
function funName() {
 // codes;
}


Note:
1.A function is Not Case Sensitive


Function Arguments:
1. Arguments are very important in PHP Training in Chennai Function because it playing
a major role in passing the particular functions Information.
2. Arguments are treated as a variable. Arguments are given the function name.
we can add many arguments in the function name and the added
arguments are separated by a comma.


Function Default Arguments:
If a Function is called without any arguments then it can declare as default arguments.
whenever the arguments are passed or called
without any variable name are called as Default Arguments.
If a function wants to return a value then we can go for return statements.
Return statements are created for this purpose only.


PHP Arrays:
1. A PHP Training Institute in Chennai Array is able to store multiple values in a single value.
2. Array plays a major role by storing the enlarged amount of values in a single variable.
3.with the help of array, we can store numerous amount of data or values.


How To Declare an Array:
array();


Types of Array:
Array are classified into three types, they are:
1.Indexed Array
2.Associative Array
3.Multidimensional Array


INDEXED ARRAY:
The Indexed array can be declared or create in two ways, they are:
1. It can be assigned spontaneously
2. It can be assigned manually or non-automatic.


How To Find the length of the Array:
By using the count() function we can able to find the length of the array and it also used
to return the number of the portion(elements) or length.PHP Course in Chennai


ASSOCIATIVE ARRAY:
1. Associative Array is assigned with a key.
2.with the use of the key, it can assign the value.


How we can Sort the Array?
With the help of Sorting Array Functions, we can able to sort the array. the segment
of an array can be sort Best PHP Training in Chennai in descending or ascending
order or numerical or alphabetical order.


Sort Array - Ascending Order:
sort() function is used to sort an array in Ascending order. through these function,
it is very easy to sort an array in ascending order.
Sort Array - Descending Order:
rsort() function is used to sort array in Descending order.through the function it is very easy to
sort an array in descending order.PHP Training in chennai


Sort Associative Array - Ascending order:
asort() function is used to sort the associative  array in ascending order according
to their value.


Sort Associative Array - Ascending order:
ksort() function is used to sort the associative array in ascending order according to their key.


Sort Associative Array - Descending order:
arsort() function is used to sort the associative  array in descending order according to their value.


Sort Associative Array - Descending order:
krsort() function is used to sort the associative array in descending order
according to their key.PHP Training Institute in chennai