GET and POST method in PHP 2 The POST Method The POST method transfers information via HTTP headers. The information is encoded as described in case of GET method and put into a header called QUERY_STRING. • The POST method does not have any restriction on data size to be sent. • The POST method can be used to send ASCII as well as binary data. • The data sent by POST method goes through HTTP header so security depends on HTTP protocol. By using Secure HTTP (https) you can make sure that your information is secure. • The PHP provides $_POST associative array to access all the sent information using GET method. Example Source Code: test.php "; echo "You are ". $_POST['age']. " years old."; exit(); } ?>
The $_REQUEST Variable The $_REQUEST variable contains the contents of both $_GET, $_POST, and $_COOKIE. The PHP $_REQUEST variable can be used to get the result from form data sent with both the GET and POST methods. Example Source Code: test.php "; echo "You are ". $_REQUEST['age']. " years old."; exit(); } ?>
GET and POST method in PHP 3 Here $_PHP_SELF variable contains the name of self script (test.php) in which it is being called. isset returns TRUE if variable exists and has value other than NULL, FALSE otherwise. Output of the above examples:
bit ucsc past papers bit ucsc notes bit ucsc fees bit ucsc classes bit ucsc application form 2019 bit ucsc gpa calculator bit ucsc contact bit ucsc lessons bit ucsc 2018 bit ucsc syllabus bit ucsc online registration bit at ucsc ucsc bit application bit degree ucsc ucsc bit gpa bit in ucsc ucsc bit learn tv ucsc bit new registration ucsc bit office bit ucsc registration bit ucsc 2019
No comments:
Post a Comment