Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Selecting Random quotes from database --randomquotes.php
- require('dbconnection.php');
- // $temp=10;
- $sql = "SELECT * FROM db.q order by rand() LIMIT 1";
- $res = mysql_query($sql,$con);
- while ($res1=mysql_fetch_assoc($res))
- {
- print "<em>".$res1['quote']."</em>";
- }
- ?>
- <div class="class_box_shadow_quote">
- <?php
- require('randomquotes.php');
- ?>
- </div>
- <script>
- var $j = jQuery.noConflict();
- $j(document).ready(function(){
- setInterval(function() {
- $j(".class_box_shadow_quote").load('randomquotes.php');
- }, 7000);
- });
- </script>
- setInterval(function() {
- $j.ajax({
- url: 'randomquotes.php',
- cache: false,
- success: function(data) {
- $j(".class_box_shadow_quote").html(data);
- }
- });
- }, 7000);
- $(".class_box_shadow_quote").load('randomquotes.php?s=' + (Math.Random() * 1000000))
Add Comment
Please, Sign In to add comment