Search
 
SCRIPT & CODE EXAMPLE
 

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));
?>
Comment

PREVIOUS NEXT
Code Example
Php :: laravellivewire is not defined 
Php :: wordpress get field 
Php :: wordpress get post slug 
Php :: wc order details 
Php :: display image in laravel 
Php :: try catch in laravel 
Php :: Auth log out laravel 
Php :: how to create new project in laravel 
Php :: php compare two versions return true or false if version is big 
Php :: wp+get custom field phpto 
Php :: acf gallery 
Php :: php all date formats 
Php :: redirect wordpress core login 
Php :: [DoctrineDBALDBALException]Unknown database type enum requested, DoctrineDBALPlatformsMySqlPlatform may not support it. 
Php :: laravel make seeder 
Php :: laravel created_at where date format 
Php :: php mysqli connect err0r 
Php :: request get query string laravel 
Php :: how to force delete in laravel 8 
Php :: laravel order by relationship 
Php :: php syntax 
Php :: php month single digit 
Php :: br php 
Php :: laravel loop counter 
Php :: how to use wherein in json array laravel 
Php :: convert multi-dimensional array into a single array in laravel 
Php :: php array merge skip diplicate 
Php :: foreach loop 1-100 php 
Php :: define("ROOT PATH", __DIR__); 
Php :: delete all cookies in php 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =