SHARE
TWEET

Untitled

StyXiu Oct 31st, 2019 26 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // define variables and set to empty values
  3. $name = $email = $gender = $comment = $website = "";
  4.  
  5. if ($_SERVER["REQUEST_METHOD"] == "POST") {
  6.   $name = test_input($_POST["name"]);
  7.   $email = test_input($_POST["email"]);
  8.   $website = test_input($_POST["website"]);
  9.   $comment = test_input($_POST["comment"]);
  10.   $gender = test_input($_POST["gender"]);
  11. }
  12.  
  13. function test_input($data) {
  14.   $data = trim($data);
  15.   $data = stripslashes($data);
  16.   $data = htmlspecialchars($data);
  17.   return $data;
  18. }
  19. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top