![]() |
Need help getting info into database
I have a file that is reading the files in a directory. I also want the file to upload the data to the database table. I can get it to send one file (even though its wrong) to the database. I am sure its a problem with my variables but am I even going about this the correct way ? I also just thought about this part but if the files already exist in the DB then i do not want them written again. Heres what I have so far.
Code:
<?phpName Size Type Content <- mediumblob binary (not sure if that is correct either) |
I'm not sure if there is another file calling this file ... But if there isn't ...
Your Foreach closes before you start the rest of your code(No loop). At least that's what I see first off. |
I have been told by several people that it is better to just save the files in a directory and save paths to a db
|
Would you have any suggestions on how to do that ? I really am a noob with this. I have managed to get a bit further with a different script. Hers what I have for this version
Code:
<?php |
I use something like this .. also note I create a thumbnail, and give a random start to the filename.
Nothing fancy but it works .. then you just echo out the image in the database, and store what you like in it .. In this case I track who uploaded it, what type of file it is, the filename, and the game it belongs to, along with comments on the image itself. PHP Code:
|
ModNote: please read the following link.
http://www.talkphp.com/lounge/4563-p...e-talkphp.html Thankyou, -CF |
| All times are GMT. The time now is 11:07 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0