Jump to content

Conexion Php


Recommended Posts

// 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

  • 1 month later...
  • 7 months later...

 

<?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

  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...