fnitsche Posted August 8, 2007 Report Share Posted August 8, 2007 // Conexion.inc.php <? // declaro la variable de conexion. $conn; // declaro una funcion para conectar. function conectar() { $conn = mysql_conect("localhost","usuario","pass") or die(mysql_error))); mysql_select_db("db",$conn); } ?> La pagina que requiera conexion : require("Conexion.inc.php"); conectar(); Atte. Fox. haber si despues les entrego el script de usuarios que tengo con install y todo =) Link to comment Share on other sites More sharing options...
sttull Posted October 8, 2007 Report Share Posted October 8, 2007 gracias Link to comment Share on other sites More sharing options...
Homer0 Posted May 27, 2008 Report Share Posted May 27, 2008 <?php // SCRIPT DE CONEXION A LA BASE DE DATOS $mysql_server = "localhost"; $mysql_user = "USUARIO"; $mysql_passwd = "PASSWORD"; $mysql_db = "NOMBRE_BASE_DE_DATOS"; $mysql_link = mysql_connect($mysql_server, $mysql_user, $mysql_passwd); ?> SALUDOS Link to comment Share on other sites More sharing options...
ozsmaster Posted July 4, 2008 Report Share Posted July 4, 2008 <?php $host = "localhost"; $usuario = "root"; $pass = "123"; $db = "base_de_datps"; $conexion = mysql_connect($host,$usuario,$pass); mysql_select_db($db,$conexion); ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now