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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...