Monday, 23 February 2015

PHP: Capture the requested URI and Clean up global variables

<?php
$requestURI = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']';
echo $requestURI;
?>

This snippet is more of an example of how to convert strings to lowercase characters, and then clean them up for use in scripts, etc
<?php
$_POST["name"] = strtolower(stripslashes(trim(htmlspecialchars($_POST["name"])))); $_POST["message"] = strtolower(stripslashes(trim(htmlspecialchars($_POST["message"]))));
?>

0 comments:

Post a Comment