Form diatas berfungsi untuk menginput data yang akan disimpan kedalam database dan perlu anda ketahui adalalah pada tag form action='inputdata.php' method='post', action berarti kode PHP yang akan memproses data yang diinput dalam form tersebut jika diklik tombol submit. Methode yang digunakan adalah POST.
POSTBoth GET and POST create an array (e.g. Array( key1 = value1,key2 = value2, key3 = value3.)). This array holds key/value pairs, wherekeys 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 (allvariable names and values are displayed in the URL).
Form Cari Di Php File
GET also has limits on the amount ofinformation to send. The limitation is about 2000 characters. However,because the variables are displayed in the URL, it is possible to bookmark thepage. 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) andhas no limits on the amount of information to send.Moreover POST supports advanced functionality such as support for multi-partbinary input while uploading files to server.However, because the variables are not displayed in the URL, it is not possible to bookmark the page.