30 lines
522 B
PHP
30 lines
522 B
PHP
|
<?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;
|
||
|
}
|
||
|
?>
|