Advertisement
Guest User

Untitled

a guest
Jun 20th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.90 KB | None | 0 0
  1. <?php
  2.     include("igrape.php");
  3.     class ConectBd extends iGrape
  4.     {
  5.         private $db = array();
  6.         private $cb = array();
  7.         public $conect = array();
  8.        
  9.         function typeBase()
  10.         {
  11.             $this->db['host'] = 'localhost';
  12.             $this->db['user'] = 'root';
  13.             $this->db['pass'] = '';
  14.             $this->db['name'] = 'samu';
  15.             $this->conectBase($db);
  16.         }
  17.        
  18.         function conectBase()
  19.         {
  20.             $this->conect['conect1'] = mysql_connect($this->db['host'],$this->db['user'],$this->db['pass']);
  21.             $this->conect['conect2'] = mysql_select_db($this->db['name'],$this->conect['conect1']);
  22.         }
  23.     }
  24. ?>
  25.  
  26. <?php
  27.     include_once("../_class/conect.php");
  28.     $con = new ConectBd;   
  29.     $con->typeBase();
  30.    
  31.     $senha = md5($_POST['txtpass']);
  32.    
  33.     $con->conect['conect2'];
  34.    
  35.     $test = mysql_fetch_assoc(mysql_query("SELECT * FROM USER WHERE ds_user='".$_POST['txtUser']."' AND ds_password='".$senha."'"));
  36.     //$con->debug($con->conect,"array");
  37.  
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement