Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?php
  2.  
  3. require_once 'db.php';
  4.  
  5. class ContratanteModel extends Banco {
  6.  
  7. private $nome;
  8.  
  9. //Metodos Set
  10. public function setNome($string){
  11. $this->nome = $string;
  12. }
  13.  
  14. //Metodos Get
  15. public function getNome(){
  16. return $this->nome;
  17. }
  18.  
  19.  
  20. public function save(){
  21. exit('chegue aqui');
  22. $stmt = $this->mysqli->prepare("INSERT INTO testetabela (`nome``) VALUES (?)");
  23. $stmt->bind_param("s",$this->nome);
  24. if( $stmt->execute() == TRUE){
  25. return true ;
  26. }else{
  27. return false;
  28. }
  29.  
  30. }
  31. }
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement