You are writing a PHP script and you need to sanitize user input. How would you do this?

  • filter_input()
  • sanitize_input()
  • validate_input()
  • clean_input()
To sanitize user input in PHP, you can use the filter_input() function. This function allows you to filter and sanitize user input based on predefined filters or custom filters. It provides a convenient way to ensure that the input is safe and free from unwanted content. For more information, refer to: http://php.net/manual/en/function.filter-input.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *