Jump to content

small problem


NickG21

Recommended Posts

if (!preg_match("/^(http(s?):\/\/|ftp:\/\/{1})((\w+\.){1,})\w{2,}$/i",$domainName))
{
$error[]="Domain Name";
$domainName="";
}

doesn't seem to be working, whether i put in a url in a valid or invalid format the error is always displayed, anyone with a little experience in preg_match have an idea where the problem is?  i found this script on a different forum where the person said it worked and it doesnt for me.  thanks to everyone in advance
Link to comment
https://forums.phpfreaks.com/topic/32098-small-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.