Note that there are some explanatory texts on larger screens.

plurals
  1. POuploading videos into a folder and its link to database using php
    primarykey
    data
    text
    <p>I am trying to upload a video and save it in a folder and its path in the database. But the videos are not inserting into the specific folder. I have searched a lot and found some code.The code is working for images .I have done some modifications from images to videos,but that didn't work. Here is the parts of my code.</p> <pre><code>&lt;form action="" method="post" enctype="multipart/form-data"&gt; &lt;div class="form_search"&gt; &lt;label&gt;Upload Video Profile:&lt;/label&gt; &lt;span class="form_input"&gt; &lt;input type="file" name="uploadvideo" /&gt; &lt;/span&gt; &lt;/div&gt; &lt;div class="form_search"&gt; &lt;label&gt; &amp;nbsp;&lt;/label&gt; &lt;span class="form_input"&gt; &lt;input type="submit" name="submitdetails" value="Upload" class="button"/&gt; &lt;/span&gt; &lt;/div&gt; &lt;/form&gt; </code></pre> <p>and my php code to upload video is</p> <pre><code>&lt;?php if(isset($_POST['submitdetails'])) { $name=$_FILES['uploadvideo']['name']; $type=$_FILES['uploadvideo']['type']; //$size=$_FILES['uploadvideo']['size']; $cname=str_replace(" ","_",$name); $tmp_name=$_FILES['uploadvideo']['tmp_name']; $target_path="company_profile/"; $target_path=$target_path.basename($cname); if(move_uploaded_file($_FILES['uploadvideo']['tmp_name'],$target_path)) { echo "hi"; echo $sql="UPDATE employer_logindetails SET (video) VALUES('".$cname."')"; $result=mysql_query($sql); echo "Your video ".$cname." has been successfully uploaded"; } } ?&gt; </code></pre> <p>Please help me where i am going wrong. All my php.ini modifications are done,and video size is only 7mb.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload