You are here: Re: how to check for "a href=" in a string « PHP Programming Language « IT news, forums, messages
Re: how to check for "a href=" in a string

Posted by Krustov on 01/25/07 00:10

<comp.lang.php>
<Veco>
<Tue, 23 Jan 2007 17:38:52 +0100>
<ep5dqh$58l$1@ss408.t-com.hr>

> I want to block my users from submitting a string that includes link(s)
> stated using a href=...
>
> probably there's some function in php?
>
> i don't want eregi_replace, I just want the code to check a string in
> variable if there's any a href... if so, then I'll use exit(); or smthng
> else
>
> Thanks for your suggestions!
>

$poop=str_replace("<","",$poop);
$poop=str_replace(">","",$poop);

This means you dont have to exit and you can see what somebody tried to
enter without it working as a hyperlink .


--
www.phptakeaway.co.uk
(work in progress)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация