tweetmonitor/common/function.php

30 lines
522 B
PHP
Raw Normal View History

2016-02-09 13:23:43 +00:00
<?php
function redirect($url)
{
echo "<script>window.location='$url'</script>";
}
function cleanString($string)
{
$trimmed = trim($string);
$detagged = strip_tags($trimmed);
if(get_magic_quotes_gpc())
{
$stripped = stripslashes($detagged);
$escaped = mysql_real_escape_string($stripped);
}
else
{
$escaped = mysql_real_escape_string($detagged);
}
return $escaped;
}
function capitalize($str)
{
$lowercaseTitle = strtolower($str);
$ucTitleString = ucwords($lowercaseTitle);
return $ucTitleString;
}
?>