dan_bsb Posted January 26, 2014 Share Posted January 26, 2014 Hey, I'm having a trouble with a code: Warning: preg_match(): Unknown modifier ')' in C:\xampp\htdocs\simulado\1\cadastro_query.php on line 24 Line 24 is: if(!preg_match("/^image\/(pjpeg|jpeg|png|gif|bmp/i)$", $img["type"])){ $error[1] = "This is not a valid image type."; } Can someone help? Quote Link to comment Share on other sites More sharing options...
Solution Ch0cu3r Posted January 26, 2014 Solution Share Posted January 26, 2014 (edited) The end of the regex should read bmp)$/i" the )$ should be before /i Edited January 26, 2014 by Ch0cu3r 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.