• Welcome to WooUSEFUL by PHPVIBE . Please log in.

[ Video Sharing CMS v4 ] Shuffle !

Started by megzz,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

megzzTopic starter

Hey
Does anyone knows how i can make a shuffle button for randomly shuffling between public videos ...

Regards
  •  

Marius

Very simple! shuffle.php

<?php require_once('load.php' );
$video = $db->get_row("SELECT id ,title from ".DB_PREFIX."videos where pub > 0 order by rand()");
if($video) {
redirect(video_url($video->id , $video->title));
}
?>
If this helped, consider buying me a coffee.
20 years coding, tweaking, building in PHP. Still creating!
  •  

Similar topics (7)