SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2003
    Location
    SoCal
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How to filter file types in Email attachments?

    Hi All!

    I am about to utilize the "Advanced Email in PHP" script (Article from here http://www.sitepoint.com/article/679/5)

    But I want to allow only images as attachments and also limit the file size.

    How would I go about doing that.

    Thanks in advance,

    Jonathan

  2. #2
    SitePoint Member tahjah's Avatar
    Join Date
    Mar 2003
    Location
    US
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to validate the attributes of the uploaded file.

    http://www.php.net/manual/en/features.file-upload.php

    You can check file extension, MIME type, filesize and such.

  3. #3
    SitePoint Member
    Join Date
    May 2003
    Location
    SoCal
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I'll look into it...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •