Login   Register  
PHP Classes
elePHPant
Icontem

File: Conn.Config.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ruben Crespo  >  CSV Importer  >  Conn.Config.php  >  Download  
File: Conn.Config.php
Role: Configuration script
Content type: text/plain
Description: Example´s Connection Config File
Class: CSV Importer
Import data from a CSV file into a MySQL table
Author: By
Last change:
Date: 2008-02-25 06:24
Size: 568 bytes
 

Contents

Class file image Download
<?php

/* ****************************************************
* Contiene los datos de acceso necesarios para
* realizar la conexión con la base de datos indicada
* contenida en un host determinado
**************************************************** */

function conexion()
{
$host="Localhost"//For Example ...
$user="yourUserName";
$pass="yourPassword";
$database="yourDatabase";

$cnx=mysql_connect($host$user$pass);
mysql_connect($host$user$pass);
echo (
mysql_error($cnx));

mysql_select_db($database$cnx);
echo (
mysql_error($cnx));

return 
$cnx;
}

?>