Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

F ORM Bayu Priyambadha, S.Kom. F ORM Form is the interface (user interface) for users to communicate with the application system. Each posted data from.

Presentasi serupa


Presentasi berjudul: "F ORM Bayu Priyambadha, S.Kom. F ORM Form is the interface (user interface) for users to communicate with the application system. Each posted data from."— Transcript presentasi:

1 F ORM Bayu Priyambadha, S.Kom

2 F ORM Form is the interface (user interface) for users to communicate with the application system. Each posted data from a user called the request and any results of processing by the server is called a response.

3 HTML F ORM In HTML, we use sintax : Form tag has attribute : Action for define destination file Method for define method used on sending request Method : Get Post Head Put Link Unlink Option Delete Trace Connect

4 G ET & P OST M ETHOD

5 R EAD S ENT D ATA Read data with Get method : Use $_GET[“name”] Read data with Post method : Use $_POST[“name”] Ex : <? echo $_GET[“data1”]; echo $_GET[“data2”]; ?> <? echo $_POST[“data1”]; echo $_POST[“data2”]; ?>

6 F ORM E LEMENTS There are several components that can be used in the field on the form include:, For this type of input in the form of field filling one row, For this type of input in the form of multi-row &, For the type of input options (combo box) Every input element have attribute named “name”, for define the name of element

7 I NPUT E LEMENT Input tag has many type : For text type For submit form For reset form For password type For file type For checkbox type For radio button type For hidden input

8 E XAMPLE Form.php Form.php Proses.php <?php echo $_GET[“nama”]; ?> Proses.php <?php echo $_GET[“nama”]; ?>

9 T RY T HIS !!! Buat sebuah form dengan inputan : Berlabel “panjang”, bertipe teks Berlabel “lebar”, bertipe teks Tombol submit Buat halaman penerima dengan spesifikasi : Menerima kiriman “panjang”, diisikan pada variabel “p”, Menerima kiriman “lebar”, diisikan pada variabel “l”, “p” dan “l” dikalikan, hasilnya dimasukan dalam variabel “hasil”, Variabel “hasil” dicetak.

10


Download ppt "F ORM Bayu Priyambadha, S.Kom. F ORM Form is the interface (user interface) for users to communicate with the application system. Each posted data from."

Presentasi serupa


Iklan oleh Google