Jump to content

catalyze326

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by catalyze326

  1. One edit that I would like to see made is on the file upload page. You use this bit of code: // Allow certain file formats if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"&& $imageFileType != "gif" ) { echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed."; $uploadOk = 0;} in order to check if an uploaded file is of the right type. It would be nice if you switched that to this: if($imageFileType == "jpg" || $imageFileType == "png" || $imageFileType == "jpeg" || $imageFileType == "gif" ) { echo "Sorry, only PDF, PNG, JPG, files are allowed."; $uploadOk = false; } It is much more efficient because you don't need to check through every file type. Its not a big deal and I don't want to come across the wrong way with this. I just know a lot of people use your code without ever looking at it themselves. It should be a pretty easy fix and it just makes the code better on the site. Thanks for everything you guys do. Most of my html, css, and php knowledge has come from you guys. Keep up the good work.
×
×
  • Create New...