Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

PHP Lecture 4 - Working with form, GET and Post Methods

PHP Lecture 4 - Working with form, GET and Post Methods

  • Login to see the comments

  • Be the first to like this

PHP Lecture 4 - Working with form, GET and Post Methods

  1. 1. WEB DEVELOPMENT
  2. 2. PHP PRESENTATORS MD. AL-MAMUN SARKAR
  3. 3. PHP Forms $_GET vs $_POST 1 2
  4. 4. Forms Text Select 1 2 Radio3 checkbox4
  5. 5. Form <form action="welcome.php" method="post"> Name: <input type="text" name="name"><br> E-mail: <input type="text" name="email"><br> <input type="submit"> </form>
  6. 6. Filtering $name = $email = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = test_input($_POST["name"]); $email = test_input($_POST["email"]); } function input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; }
  7. 7. QUESTION ?
  8. 8. THANK YOU

×