Пример #1
0
 public function getOpcoes()
 {
     parent::setTabela('sebraeprev_enquete_opcoes');
     $opcoes = parent::select(array("id, titulo"), "WHERE id_enquete = {$this->id_enquete}");
     return $opcoes;
 }
Пример #2
0
<?php

session_start();
require_once '../../conn.php';
require_once '../../crud.php';
$c = new conn();
$login = new crud();
$c->conectar();
$login->setCampo('codigo, nome, tipo');
$login->setTabela('tb_usuario');
$login->setCondicao('login = "******" AND senha = "' . md5($_POST['senha']) . '" ');
$_SESSION['user'] = json_encode($login->select());
header('Location: ../../');