Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

sanitize user input php

<?php
function sanitize($stringToSanitize) {
	return addslashes(htmlspecialchars($stringToSanitize));
}
// You can just use the codes themselves instead of creating a function as:
echo addslashes(htmlspecialchars($stringToSanitize));
?>
 
PREVIOUS NEXT
Tagged: #sanitize #user #input #php
ADD COMMENT
Topic
Name
9+8 =