Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (7)

Sign In or Sign Up now to post a comment!
  • Yup , There is no need to check the dot :D

  • what if i upload a file called "some.thing.jpg"

  • @lordofthemonths

     $var='image/jpeg'; $type = $_FILES['file']['type']; if ($type==$extn){}else{echo 'Only jpg files only';} this worked very well

  • @CroceMalo1 so we don't need to check the dot? only $type is enough?

  • @lordofthemonths instead of getting the . get the letter after the dot, see if its a j, if not, then continue, and if it is, then check the letter after the j, see if its p, and so on

  • Why is if($type=='image/jpeg'){} not enough?

  • Thank you, you are a great teacher :D

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more