الأحد، 15 مارس 2015

Notes for Web Technologies Through PHP Exam -CSIB

GET vs. POST

Both GET and POST create an array (e.g. array( key => value, key2 => value2, key3 => value3, ...)). This array holds key/value pairs, where keys are the names of the form controls and values are the input data from the user.

Both GET and POST are treated as $_GET and $_POST. These are superglobals, which means that they are always accessible, regardless of scope - and you can access them from any function, class or file without having to do anything special.

$_GET is an array of variables passed to the current script via the URL parameters.

$_POST is an array of variables passed to the current script via the HTTP POST method.
When to use GET?

Information sent from a form with the GET method is visible to everyone (all variable names and values are displayed in the URL). GET also has limits on the amount of information to send. The limitation is about 2000 characters. However, because the variables are displayed in the URL, it is possible to bookmark the page. This can be useful in some cases.

GET may be used for sending non-sensitive data.

Note: GET should NEVER be used for sending passwords or other sensitive information!
When to use POST?


Information sent from a form with the POST method is invisible to others (all names/values are embedded within the body of the HTTP request) and has no limits on the amount of information to send.

Moreover POST supports advanced functionality such as support for multi-part binary input while uploading files to server.

However, because the variables are not displayed in the URL, it is not possible to bookmark the page.

Some other notes on GET requests:

    GET requests can be cached
    GET requests remain in the browser history
    GET requests can be bookmarked
    GET requests should never be used when dealing with sensitive data
    GET requests have length restrictions
    GET requests should be used only to retrieve data

Some other notes on POST requests:

    POST requests are never cached
    POST requests do not remain in the browser history
    POST requests cannot be bookmarked
    POST requests have no restrictions on data length



What is the difference between WAMP LAMP MAMP?

What is LAMP SERVER ?

1.Full form of LAMP is Linux, Apache, MySQL and PHP.

2.This is a open source platform.

3. LAMP Server is work on Linux Operating System only.

4. LAMP is a combine package of  Linux, Apache, MySQL and PHP.

5. Apache is the web server

6. Mysql is the relational database management system.

7. PHP is the object-oriented scripting language.


What is WAMP SERVER ?

1.Full form of WAMP is Windows, Apache, MySQL and PHP.

2.This is a open source platform.

3. WAMP Server is work on Windows Operating System only.

4. LAMP is a combine package of  Windows, Apache, MySQL and PHP.

5. Apache is the web server

6. Mysql is the relational database management system.

7. PHP is the object-oriented scripting language.


What is MAMP SERVER ?

1.Full form of MAMP is MAC, Apache, MySQL and PHP.

2.This is a open source platform.

3. MAMP Server is work on MAC Operating System only.

4. LAMP is a combine package of  MAC, Apache, MySQL and PHP.

5. Apache is the web server

6. Mysql is the relational database management system.

7. PHP is the object-oriented scripting language.


What is XAMPP SERVER ?

1. xampp stands for x-os, apache, mysql, php , perl.

2. This is a open source platform.

3.  X-OS means it can be used for any operating system.

4. XAMPP for major operating system including windows, mac, Linux.

4. XAMPP  come with additional features including support of perl, filezilla, mercury mail and some scripts.




Continue to Notes for PHP






ليست هناك تعليقات:

إرسال تعليق