dan_t Posted July 5, 2010 Share Posted July 5, 2010 This code is for a file upload, but how do I put the files(images) in a folder, somewhere in the server? I know near to nothing of javascript, just a basic validation. <form name="form1" enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <label for="upload[]">File 1:</label> <input type="file" name="upload[]" size="30"><br> <label for="upload[]">File 2:</label> <input type="file" name="upload[]" size="30"><br> <label for="upload[]">File 3:</label> <input type="file" name="upload[]" size="30"><br> <!-- Add here more file fields if you need. --> </form> A Link to comment https://forums.phpfreaks.com/topic/206803-file-or-image-upload-storing-for-database-use/ Share on other sites More sharing options...
phpSensei Posted July 5, 2010 Share Posted July 5, 2010 move_uploaded_file ( string $filename , string $destination ) the 2nd param is where you tell the function to place the file which you are uploading. Heres a tutorial http://www.tizag.com/phpT/fileupload.php Link to comment https://forums.phpfreaks.com/topic/206803-file-or-image-upload-storing-for-database-use/#findComment-1081536 Share on other sites More sharing options...
dan_t Posted July 5, 2010 Author Share Posted July 5, 2010 Thanks phpSensei I'll give it a try. Link to comment https://forums.phpfreaks.com/topic/206803-file-or-image-upload-storing-for-database-use/#findComment-1081543 Share on other sites More sharing options...
phpSensei Posted July 5, 2010 Share Posted July 5, 2010 Thanks phpSensei I'll give it a try. Np.. If this has helped solve your problem mark it as solved , if you have more questions then come back to this thread, ill check back to see if you have gotten it. Link to comment https://forums.phpfreaks.com/topic/206803-file-or-image-upload-storing-for-database-use/#findComment-1081563 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.