PHP simple : PHP tutorial, MySQL tutorial
PHP Tutorial - Free PHP Script

Home | Tutorials | Php vs Node.Js | Web Tools

Using Form


Using forms in a web based application is very common. Most forms are used to gather information like in a signup form, survey / polling, guestbook, etc.

There are some component in form tag.

Method

A form can have the method set as POST or GET.

  • POST method. This method sends the data from the form within the body of the processing agent. This makes the post method secure and reliable when sending what might be sensitive data from one location to another.

  • GET method. You can get attaches the information to the URL and passes the information in a manner that can be seen by the user so is therefore not a secure method of passing sensitive data. This method also carries a restriction on the amount of data that can be transferred, it is a reasonable amount of data but restricted none the less. This is an example for GET method using by URL

    http://www.phpsimple.net/file.php?id=12&id2=34

    There are 2 parameters attaching in this URL. Use "?" between real URL and first parameter and use "&" between parameters. Do not use "space" in URL.

    GET method, you can use by form tag by enter "GET" in method component.

When using a form with method="post" you can use $_POST to access the form values. And when the form is using method="get" you can use $_GET to access the values. The $_REQUEST superglobal can be used to to access form values with method="post" and method="get" but it is recommended to use $_POST or $_GET instead so you will know from what method did the values come from.

Advertise
Put Ebay RSS Feeds onto your website
SEO Elite Software
Domain Dashboard CPanel & Seo Manager
Work at Home Ideas and Opportunities
Introduction & Get Start
Using Form
PHP
PHP Tags
PHP Variables
PHP Control Structures
MySQL
Create Database & Table
Database Connection
Insert Record
Select Record
Update Record
Delete Record

PHPsimple.net
info@phpsimple.net