Jump to content

[SOLVED] Stopping specific strings (.jpg etc)


RickyF

Recommended Posts

Hey,

 

How can i make it so that only if .jpg etc is stopped, as the word jpg etc is being stopped, i tried adding dots before each word in the array, but this made no difference.

 

Thanks

 

  if (eregi("jpg|jpeg|gif|bmp|png", $weburl)) {
  die ("Your website url can not be an image.");
       }

 

Link to comment
https://forums.phpfreaks.com/topic/59942-solved-stopping-specific-strings-jpg-etc/
Share on other sites

Hello,

 

The script is actually a plug board im developing, the point of the partiular validation is to stop people from posting the link to their banner in the website url input field, as some people seem to get confused and try putting the image into the web address and vice versa.

 

Thanks for the help.

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.