Viewing file: video.php (2.29 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE html> <html>
<head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"> <link rel="stylesheet" href="videogallery/assets/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="videogallery/assets/fonts/font-awesome.min.css"> <link rel="stylesheet" href="videogallery/assets/css/Bootstrap-4---Photo-Gallery.css"> <link rel="stylesheet" href="videogallery/assets/css/styles.css"> </head> <body> <center><hr><h3>Video Tutorial </h3><center> <div class="photo-gallery"> <div class="container-fluid"> <div class="px-lg-5">
<div class="row"> <?php for($i=9;$i>0;$i--) { $link = mysqli_connect("localhost", "rcgi_schooluser", "rb!sch838", "rcgi_school"); // Check connection if($link === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } // Attempt select query execution $sql = "SELECT * FROM videolist where classes='COMPUTER' AND lession=$i LIMIT 5 "; if($result = mysqli_query($link, $sql)){ if(mysqli_num_rows($result) > 0){ $paragraph=0; while($row = mysqli_fetch_array($result)){ $url=$row[url]; $title=$row[title]; $lession=$row[lession]; $classses=$row[classes]; echo '<div class="col-xl-3 col-lg-4 col-md-6 mb-4">'; echo "<div class='bg-white rounded shadow-sm'><iframe width='280' height='200' src='$url' frameborder='0' allowfullscreen></iframe>"; echo '<div class="p-4">'; echo '<h5> <a href="#" class="text-dark"></a></h5>'; echo '<p class="small text-muted mb-0">'.$title.'</p>'; echo '<div class="d-flex align-items-center justify-content-between rounded-pill bg-light px-3 py-2 mt-4">'; echo '<p class="small mb-0"><i class="fa fa-picture-o mr-2"></i><span class="font-weight-bold">Chapter:-'.$lession.'</span></p>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; } // Free result set mysqli_free_result($result); } else{ } } else{ echo "ERROR: Could not able to execute $sql. " . mysqli_error($link); } // Close connection mysqli_close($link); } ?>
</div>
</div> </div> </div> <script src="videogallery/assets/js/jquery.min.js"></script> <script src="videogallery/assets/bootstrap/js/bootstrap.min.js"></script> </body>
</html>
|