I have an input like this:
<input name='postImg' type='text'><?php if(isset($error)){ echo $_POST['postImg'];}?></input>
I would like PHP to check if the input text contains: .png or .jpeg or .gif etc. To make sure its a image. But it has to be input name (so no upload).
How can I do this best?
ren nastyvirus.exe cutekittens.jpg, for one...