すくすくゴートうちゃんのサーヴァ(黒歴史)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
411 B

  1. <?php
  2. class
  3. Chat
  4. {
  5. public int $id;
  6. public int $user_id;
  7. public string $pass;
  8. function
  9. insert ():
  10. int
  11. {
  12. $sql = "
  13. INSERT INTO
  14. chats (
  15. user_id,
  16. text)
  17. VALUES
  18. (
  19. {$this -> user_id},
  20. '{$this -> text}')";
  21. $GLOBALS['__db_connection'] -> query ($sql)
  22. or die ("db_insert error $sql");
  23. }
  24. }