string addslashes(string text)
The addslashes function returns the text argument with backslashes preceding
characters that have special meaning in database queries. These are single quotes ('),
double quotes ("), and backslashes themselves ().
<?
// add slashes to text
$phrase = addslashes("I don't know");
// build query
$Query = "SELECT * ";
$Query .= "FROM comment ";
$Query .= "WHERE text like '%$phrase%'";
print($Query);
?>
string base64_decode(string data)
The base64_decode function translates data from MIME base64 encoding into 8-bit
data. Base64 encoding is used for transmitting data across protocols, such as email, where
raw binary data would otherwise be corrupted.
<?
$data = "VGhpcyBpcyBhIAptdWx0aS1saW5lIG1lc3NhZ2UK";
print(base64_decode($data));
?>
string base64_encode(string text)
The base64_encode function converts text, such as email, to a form that will pass
through 7-bit systems uncorrupted.
<?
$text = "This is a \nmulti-line message\n";
print(base64_encode($text));