phpSensei Posted August 18, 2007 Share Posted August 18, 2007 I Keep getting this error message: Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in C:\wamp\www\site\cat\index.php on line 407 Please Type A Valid Link In This Format "http://www." Code: $part=htmlentities($_POST['part']); $link=htmlentities($_POST['link']); $genre=mysql_real_escape_string($_POST['genre1']); $count=mysql_fetch_array(mysql_query("SELECT * FROM list WHERE title = '$genre'")); $id=$count['id']; $http=explode(" ",$link); if(empty($part)||empty($link)){ die("Please Fill In All The Fields"); } elseif(($link == "Link")or($link == "link")){ die("Please Fill In All The Fields"); } elseif(!preg_match("http://www.",$http[0])){ die("Please Type A Valid Link In This Format \"http://www.\""); } Quote Link to comment Share on other sites More sharing options...
Masna Posted August 18, 2007 Share Posted August 18, 2007 I imagine the compiler isn't joking when it demands a delimiter... preg_match("http://www.",$http[0]) --> preg_match("^http://www.$",$http[0]) Quote Link to comment Share on other sites More sharing options...
phpSensei Posted August 18, 2007 Author Share Posted August 18, 2007 And I Assume Its Not Joking When It Asks For: Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\site\cat\index.php on line 407 Please Type A Valid Link In This Format "http://www." Quote Link to comment Share on other sites More sharing options...
Masna Posted August 18, 2007 Share Posted August 18, 2007 ^...^$ Quote Link to comment Share on other sites More sharing options...
phpSensei Posted August 18, 2007 Author Share Posted August 18, 2007 lol, thanks for your help... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.