Answers for "taking user input using php"

PHP
2

how to request user input in php

<?php
echo "What do you want to input? ";
$input = rtrim(fgets(STDIN));
echo "I got it:\n" . $input;
Posted by: Guest on August-13-2020
1

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));
?>
Posted by: Guest on December-02-2020

Code answers related to "taking user input using php"

Browse Popular Code Answers by Language