Ver Mensaje Individual
  #4 (permalink)  
Antiguo 02/06/2011, 18:51
rockyto
 
Fecha de Ingreso: mayo-2011
Mensajes: 7
Antigüedad: 13 años
Puntos: 0
Respuesta: Base de datos no seleccionada

Cita:
Iniciado por ylellan Ver Mensaje
corazon q ta un buen archivo de conexion:

Código PHP:
<?php 
function conectar()
{

    
mysql_connect("localhost","root","root");

    
mysql_select_db("tu_base");
}
function 
desconectar()
{
    
mysql_close();
}
?>

y ya despues

Código PHP:
<?php require_once(/var/www/connections/resta… 
conectar
();
?>
<?php
if (!function_exists("getsqlvaluestring")) {
function 
getsqlvaluestring($thevalue$thetype$thedefinedvalue ""$thenotdefinedvalue "")
{
$thevalue get_magic_quotes_gpc() ? Stripslashes($thevalue) : $thevalue;

$thevalue function_exists("mysql_real_escape_strin… ? Mysql_real_escape_string($thevalue) : Mysql_escape_string($thevalue)");

switch (
$thetype) {

.
.
.
Desconectar();
suerte
gracias amiga!! Ya encontre mi problema!! El detalle es que no tengo la base de datos, la perdi =( no sabes como le hago para buscar las variables en todo el sistema y hacer la base de datos?