sangi Posted October 6, 2008 Share Posted October 6, 2008 ??? ??? ??? ??? ??? HI all, I have uploaded the video and i stored the path of the video into the database. When i tried to retriev it, i couldn't. So can anyone of you help me please...... Link to comment https://forums.phpfreaks.com/topic/127208-how-to-retriev-videos-from-database/ Share on other sites More sharing options...
steveclondon Posted October 6, 2008 Share Posted October 6, 2008 think you will need to provide more information, what error message did you get? the code you use? how you stored the name? Link to comment https://forums.phpfreaks.com/topic/127208-how-to-retriev-videos-from-database/#findComment-657994 Share on other sites More sharing options...
sangi Posted October 6, 2008 Author Share Posted October 6, 2008 Thank you for your reply and i have provided the code, which i have used to upload and retrieve the video files and i didn't get any error but the video didn't get played. <?php $conn=mysql_connect("localhost","root",""); mysql_select_db("sangi"); echo $_SERVER['REQUEST_METHOD']; $r=$_GET['r']; if($r==1) { $target="sangi/"; $target=$target.basename($_FILES['upfile']['name']); $filename=basename($_FILES['upfile']['name']); if(move_uploaded_file($_FILES['upfile']['tmp_name'],$target)) { echo "file uploaded sucessfully"; mysql_query("INSERT INTO `sangi`.`det` (`sno` ,`filename`)VALUES ('', '$filename')"); $rst=mysql_query("select * from det"); while($qry=mysql_fetch_array($rst)) { ?> <a href="sangi/<?php echo $qry['filename']; ?>" > download </a> <?php echo "<br>"; } mysql_close($conn); } } ?> <form action="upload.php?r=1" method="post" enctype="multipart/form-data"> <input name="upfile" type="file"> <input type="submit" name="Submit" value="Submit"> </form> Link to comment https://forums.phpfreaks.com/topic/127208-how-to-retriev-videos-from-database/#findComment-658011 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.