Senin, 19 Agustus 2013

PENGOLAHAN DATA DARI FORM

Web menerima input dari user atau pengunjung menggunakan metode GET dan POST. GET akan mengirimkan data bersama dengan URL, sedangkan POST mengirimkannya secara terpisah.
User mengirimkan data input dengan mengisi teks atau pilihan pada attribut form html. Apa saja yang merupakan komponen form html diantaranya :

Form

<FORM ACTION=action base> form tags </FORM>
<FORM METHOD=method> form tags </FORM>
<FORM ENCTYPE=media type> form tags </FORM>
<FORM ACTION=action base TARGET="target window name"> form tags </FORM>
<FORM SCRIPT=URL> form tags </FORM>

Note : target window name  diisikan berupa:
_blank
_self
_parent
_top

Form Input Check Box

<INPUT TYPE=CHECKBOX NAME=name VALUE=value>
<INPUT TYPE=CHECKBOX NAME=name VALUE=value CHECKED>

Form Input File

<INPUT TYPE=FILE NAME=name ACCEPT=mime type list>

Form Input Hidden

<INPUT TYPE=HIDDEN NAME=name VALUE=value>

Form Input Image

<INPUT TYPE=IMAGE NAME=name SRC="URL">
  <INPUT TYPE=IMAGE NAME=name SRC="URL" ALIGN="alignment">

Form Input Password

<INPUT TYPE=PASSWORD NAME=name>
<INPUT TYPE=PASSWORD NAME=name MAXLENGTH=length>
<INPUT TYPE=PASSWORD NAME=name SIZE=size>
<INPUT TYPE=PASSWORD NAME=name VALUE=value>

Form Input Radio Button

<INPUT TYPE=RADIO NAME=name VALUE=value>
<INPUT TYPE=RADIO NAME=name VALUE=value CHECKED>

Form Input Range

This is not supported in many browsers.
<INPUT TYPE=RANGE NAME=name MIN=min MAX=max>
<INPUT TYPE=RANGE NAME=name MIN=min> MAX=max VALUE=value>

Form Input Reset

<INPUT TYPE=RESET>

Form Input Submit

<INPUT TYPE=SUBMIT>
<INPUT TYPE=SUBMIT NAME=name>
<INPUT TYPE=SUBMIT VALUE=value>

Form Input Button

<INPUT TYPE=BUTTON>
<INPUT TYPE=BUTTON NAME=name>
<INPUT TYPE=BUTTON VALUE=value>

Form Input Text

<INPUT TYPE=TEXT NAME=name>
<INPUT TYPE=TEXT NAME=name MAXLENGTH=length>
<INPUT TYPE=TEXT NAME=name SIZE=size>
<INPUT TYPE=TEXT NAME=name VALUE=value>

Form Select

<SELECT NAME=name> option entries </SELECT>
<SELECT NAME=name MULTIPLE> option entries </SELECT>
<SELECT NAME=name SIZE=size> option entries </SELECT>
<SELECT NAME=name SRC=URL WIDTH=width HEIGHT=height UNITS=units> option entries </SELECT>
<OPTION> content
<OPTION SELECTED> content
<OPTION VALUE=value> content
<OPTION SHAPE=shape>

Form Text Area


<TEXTAREA NAME=name COLS=# columns ROWS=# rows> content </TEXTAREA> 

Tidak ada komentar :

Posting Komentar