php function get_magic_quotes_gpc

WBOY
Release: 2016-07-25 08:51:54
Original
881 people have browsed it
  1. echo get_magic_quotes_gpc(); // Sorry, mine is 0
  2. echo $_POST['lastname']; / / Simao'pig
  3. echo addslashes($_POST['lastname']); // Simao'pig

  4. if (!get_magic_quotes_gpc()) {

  5. $lastname = addslashes($_POST['lastname ']);
  6. } else {
  7. $lastname = $_POST['lastname'];
  8. }

  9. echo $lastname; // Simao'pig

  10. $sql = "INSERT INTO lastnames ( lastname) VALUES ('$lastname')";
  11. ?>

Copy code


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template