Guest User

user56

a guest
Jan 17th, 2011
73
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
  6. <meta http-equiv="refresh" content="10" />
  7. <title></title>
  8. </head>
  9.  
  10. <body>
  11.  
  12. <?php
  13.  
  14.  
  15. require('connect.php');
  16. require('functions.php');
  17.  
  18. $query = "SELECT * FROM `feeds`";
  19.  
  20. //takes all the feed that are declared
  21. $result = mysql_query($query);
  22. $data   = array();
  23. while($output = mysql_fetch_assoc($result)) {
  24.     $data[] = $output;                  // assigns feeds to an array called $data, one after the other, in they go!
  25.                
  26. }
  27.  
  28. $feed = randomchoice($data);            // finds a random feed by calling the function
  29.  
  30. //the value i want to pass is $feed['feed_url'],$feed['feed_name']
  31. ?>
  32. </body>
  33. </html>
RAW Paste Data