Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("igrape.php");
- class ConectBd extends iGrape
- {
- private $db = array();
- private $cb = array();
- public $conect = array();
- function typeBase()
- {
- $this->db['host'] = 'localhost';
- $this->db['user'] = 'root';
- $this->db['pass'] = '';
- $this->db['name'] = 'samu';
- $this->conectBase($db);
- }
- function conectBase()
- {
- $this->conect['conect1'] = mysql_connect($this->db['host'],$this->db['user'],$this->db['pass']);
- $this->conect['conect2'] = mysql_select_db($this->db['name'],$this->conect['conect1']);
- }
- }
- ?>
- <?php
- include_once("../_class/conect.php");
- $con = new ConectBd;
- $con->typeBase();
- $senha = md5($_POST['txtpass']);
- $con->conect['conect2'];
- $test = mysql_fetch_assoc(mysql_query("SELECT * FROM USER WHERE ds_user='".$_POST['txtUser']."' AND ds_password='".$senha."'"));
- //$con->debug($con->conect,"array");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement