Hello friends, The logic is to retrieve all the videos from the database and play them in the browser. <?php $con=mysql_connect("localhost","root",""); if(!$con) { mysql_error(); } mysql_select_db("my_upload",$con); $result = mysql_query("SELECT * FROM upload"); $assoc = mysql_fetch_assoc( $result ); $videofolder = './upload/'; while($row = mysql_fetch_array($result)) { $vid1= $row['vid_name']; if (!preg_match('/\.(mpg|wmv|avi)$/i', $vid1) OR !file_exists($videofolder . $vid1)) { exit(); } echo "<img dynsrc=$videofolder . $vid1 WIDTH=400 HEIGHT=200 type=application/mpg/>"; echo "<br/>"; } mysql_close($con); ?> Code (markup): I need help as quickly as possible,
It looks fine to me. I would add start="FILEOPEN" and fix a few things to make the html valid. echo '<img dynsrc="'.$videofolder.$vid1.'" width="400" height="200" start="FILEOPEN" type="application/mpg/">'; PHP: