Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $acc_music = mysql_real_escape_string($_POST['acc_music']);
- function strip_tags_content($text, $tags = '', $invert = FALSE) {
- preg_match_all('/<(.+?)[s]*/?[s]*>/si', trim($tags), $tags);
- $tags = array_unique($tags[1]);
- if(is_array($tags) AND count($tags) > 0) {
- if($invert == FALSE) {
- return preg_replace('@<(?!(?:'. implode('|', $tags) .')b)(w+)b.*?>.*?</1>@si', '', $text);
- }
- else {
- return preg_replace('@<('. implode('|', $tags) .')b.*?>.*?</1>@si', '', $text);
- }
- }
- elseif($invert == FALSE) {
- return preg_replace('@<(w+)b.*?>.*?</1>@si', '', $text);
- }
- return $text;
- }
- mysql_query("UPDATE users SET youtube_embed = '".strip_tags_content($acc_music)."' WHERE id = '" . $_SESSION['user']['id'] . "'")or die(mysql_error());
- ?>
- $text = str_replace( array('<', '>'), '', $text);
- return $text;
- return str_replace( array('<', '>'), '', $text);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement