I am trying to insert to insert a video into a folder and its path into the database.
But both the things are not working for me.
And also I need to retrieve the video from database.
Can someone help me where i went wrong.
My html to upload video is

<form action="" method="post" enctype="multipart/form-data">
<div class="form_search">
<label>Upload Video Profile:</label>
<span class="form_input">
<input type="file" name="uploadvideo"  />

<div class="form_search">
<label> &nbsp;</label>
<span class="form_input">
<input type="submit" name="submitdetails" value="Upload" class="button"/>

and my php code to store the video in a folder named "company_profile" is

    $cname=str_replace(" ","_",$name);
        echo "hi";
        echo "Your video ".$cname." has been successfully uploaded";


Please help me how i can store the video file and retrieve it

Edited by muktapuram

4 Years
Discussion Span
Last Post by diafol

Your code seems ok.
You can try the following:

  • Open your php.ini file.
  • Make a backup of that file.
  • Find the term "post_max_size" > Change this value to something higher (than the file you are uploading)
  • Find the term "upload_max_filesize" > Change this value to something higher
  • Save the file and Restart your webservice.

Now try uploading your file again. Hope this works (at least I did this when it happened to me).


Thanks for ur reply , but my file is only 7mb of size.
is it required to modify php.ini
Anyway i am going to try that now.

Edited by muktapuram


Have you considered hosting the video on a service like YouTube or Vimeo? General servers are pretty poor at delivering video, especially if you have a lot of visitors. You then just need to store the unique id in the DB and build the iframe code with that id - quite simple.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.