WEEK 10 - PHP Form
In this week learn about how to create a php form and how to put php validation to secure the form.First ,we use the example provide in w3school.com .After that, lecturer give us a data to key- in in database. Before that, we need to connect the XAMPP and create the table, after that key-in all the data inside the table. Example of data INPUT : < !DOCTYPE HTML > < html > < head > < /head > < body > <?php // define variables and set to empty values $name = $email = $gender = $comment = $website = "" ; if ( $_SERVER [ "REQUEST_METHOD" ] == "POST" ) { $name = test_input( $_POST [ "name" ]); $email = test_input( $_POST [ "email" ]); $website = test_input( $_POST [ "website" ]); $comment = test_input( $_POST [ "comment" ]); $gender = test_input( $_POST [ "gender" ]); } function test_input($data) { $data = trim($d...