Fastest Web Hosting

i want to know how insert multiple video files in database

0 votes
asked Jul 13, 2016 in Mysql by rajatinsa (3,350 points)

I am creating a small scale Admin Panel(desktop app) for managing videos(Insert,Update,Delete and Play).So far I am able to insert a single video file inside the database via OpenFileDialog.

1 Answer

0 votes
answered Aug 4, 2016 by Vinod Shivaji Kakad (500 points)

In input tag add multiple attribute & name attribute add array symbol for eg:

<input type="file" name="videos[]"  multiple="multiple" >
.. then u will be able select multiple files.
to insert the files in database use foreach loop
for eg: 
foreach ($_FILES['videos']['name'] as $f => $name) {
// insert query

Job Board

TechnicalSharp is a technical community of developers where they are sharing their knowledge and solutions and against it they are getting the score point which help them to make profile strong which is under eyes on MNC's