[HD] PHP Tutorial : Image Upload (MySQL) Part 2


Original source


30 responses to “[HD] PHP Tutorial : Image Upload (MySQL) Part 2”

  1. WOW!!! that's so informative… to those who expects mySQL, its actually a tutorial on how to save image to your server. the thing here is that you submitted it online, all you have to do is to add your query on the execution, example: save the image name on a column in your database.. so in summary, u did not saved it in database, u just use it's name to call it… Take note to use the function strtolower() on php to avoid data error… thank you anyway…

  2. …then store the real name for when the file is to be downloaded (for reference).

    This is a very very good tutorial and is pretty much all is needed to get going at least. Yes it lacked the final final part for MySQL but if you know how to add data to MySQL then you'll be sorted with this tutorial.

    As for the uploaded folders, you will need to create that on the server yourself and reference it in your code. Check the part in the video where it says "move_uploaded_file". "uploaded/" is it.

  3. If it's just a few files in MySQL then that's fine to add to MySQL but in all honesty I'd only store the file information in the database. In order to do that the variables already stored at the start of this video is all that's needed.

    The part where the file is uploaded, you take the $name, $size, or other info you need and INSERT it into your database at the same time.

    Personally I'd hash the temp filenames for security reasons and use that as the actual uploaded filename…

Leave a Reply