Guest User

Untitled

a guest
Nov 28th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.94 KB | None | 0 0
  1. <?
  2. // By Thejuster
  3. //------------------
  4. // Configurazione
  5. //--------------
  6. $host = 'localhost';
  7. $db = 'tmp';
  8. $user = '*****';
  9. $pass = '*********';
  10.  
  11.  
  12. class Database
  13. {
  14.  
  15.  
  16. function Connect()
  17. {
  18.  
  19. $connect = mysql_connect($host,$user,$pass);
  20.  
  21. mysql_select_db($db,$connect);
  22.  
  23. }
  24.  
  25.  
  26. function Get_last_shout()
  27. {
  28. $messaggio = "";
  29.  
  30. $sql = mysql_query("SELECT * FROM shoutbox_shouts");
  31. while($row = mysql_fetch_arry($sql)) { $messaggio = $row[s_message]; }
  32.  
  33. echo $messaggio;
  34. }
  35.  
  36. function  Get_last_user_shout()
  37. {
  38. $mid;
  39.  
  40. $sql = mysql_query("SELECT * FROM shoutbox_shouts");
  41. while($row = mysql_fetch_arry($sql)) { $mid = $row[s_mid]; }
  42.  
  43. $sql = mysql_query("SELECT * FROM members WHERE member_id='$mid';");
  44. $row = mysql_fetch_array($sql);
  45. echo $row[members_display_name];
  46. }
  47.  
  48. }
  49.  
  50.  
  51.  
  52. //-----------------
  53. $db = new Database();
  54.  
  55. $db->Connect();
  56.  
  57. echo "" + $db->Get_last_user_shout() + ":" + $db->Get_last_shout() + "";
  58.  
  59.  
  60. ?>
Add Comment
Please, Sign In to add comment