Forum Moderators: coopster
Please someone who can use preg_match help me...
i check if the url is write using this
preg_match("/^(http(s?):\\/\\/¦ftp:\\/\\/{1})((\w+\.)+)\w{2,}(\/?)$/i", $url)
but i found that it wont accept dynamic pages with URLs like "?" or "&"
so can u edit it to let it accept those characters and if more needed that is needed for dynamic urls..
Thanks in advance
Hmmm I should remove it.
$site_love= $_POST['site_love']; // echo"site love.$site_love";
$pre="http://";
$site_love_2=$pre.$site_love;
if(!preg_match("/^[a-zA-Z]+[:\/\/]+[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-_]+$/i",$site_love_2)) {
Echo"You must supply a valid URL. site you love<br>
<b>$biz_name</b><br>
<a href=\"../n_c/pre_quest.php\">Please try again</a>";
Exit();
}