Foros del Web » Programando para Internet » PHP »

Problema en creación de registro.

Estas en el tema de Problema en creación de registro. en el foro de PHP en Foros del Web. Bueno la verdad nose si lo que voy a preguntar a continuación va en esta sección pero bueno. Resulta que yo estoy creando por primera ...
  #1 (permalink)  
Antiguo 19/11/2009, 16:59
 
Fecha de Ingreso: noviembre-2009
Mensajes: 2
Antigüedad: 14 años, 5 meses
Puntos: 0
Problema en creación de registro.

Bueno la verdad nose si lo que voy a preguntar a continuación va en esta sección pero bueno.

Resulta que yo estoy creando por primera ves un registro y lo creo bien al formulario en Dream V. cs 3, cuando quiero conectarlo a mi host remotamente me saltan diversos errores y bueno como ya me arte de intentar variantes, justo encontré un post de un usuario que decía que otra opción era clonar la base de datos en la pc local y darle los mismos atributos que tiene el Host remoto. Cuando lo creo todo bien unos los campos a donde corresponde y cuando lo subo a mi host me sale este error:

Código:
"Warning: require_once(sitio1/Connections/conex.php) [function.require-once]: failed to open stream: No such file or directory in /home/abdesign/public_html/register.php on line 1

Fatal error: require_once() [function.require]: Failed opening required 'sitio1/Connections/conex.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/abdesign/public_html/register.php on line 1 "

El codigo del PHP es el siguiente:

Código:
<?php require_once('sitio1/Connections/conex.php'); ?>
<?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_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO torneo (team, jugador1, jugador2, jugador3, jugador4, jugador5, suplente1, suplente2, suplente3, mailtl, password) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['team'], "text"),
                       GetSQLValueString($_POST['jugador1'], "text"),
                       GetSQLValueString($_POST['jugador2'], "text"),
                       GetSQLValueString($_POST['jugador3'], "text"),
                       GetSQLValueString($_POST['jugador4'], "text"),
                       GetSQLValueString($_POST['jugador5'], "text"),
                       GetSQLValueString($_POST['suplente1'], "text"),
                       GetSQLValueString($_POST['suplente2'], "text"),
                       GetSQLValueString($_POST['suplente3'], "text"),
                       GetSQLValueString($_POST['mailtl'], "text"),
                       GetSQLValueString($_POST['password'], "text"));

  mysql_select_db($database_conex, $conex);
  $Result1 = mysql_query($insertSQL, $conex) or die(mysql_error());
}
?></html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
.Estilo1 {
	font-size: 24px;
	font-weight: bold;
}
.Estilo4 {font-size: 14px}
body {
	background-color: #666666;
}
.Estilo5 {font-size: 18px; }
-->
</style>
</head>

<body>
<div align="center" class="Estilo1">
  <p align="center" class="Estilo5">Registro Torneo</p>
  <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
    <label>
    <div align="left"><span class="Estilo4"><br />
      TEAM </span>
      <input type="text" name="team" id="team" />
      <br />
      <br />   
      <span class="Estilo4">Jugador 1</span>
      <input type="text" name="jugador1" id="jugador1" />   
      <br />   
      <br />   
      <span class="Estilo4">Jugador 2
      <input type="text" name="jugador2" id="jugador2" />
      <br />   
      <br />
      Jugador 3
      <input type="text" name="jugador3" id="jugador3" />
      <br />
      <br />
      Jugador 4
      <input type="text" name="jugador4" id="jugador4" />
      <br />
      <br />
      Jugador 5
      <input type="text" name="jugador5" id="jugador5" />
      <br />
      <br />
      </span><span class="Estilo4">Suplente 1
      <input type="text" name="suplente1" id="suplente1" />
      <br />
      <br />
      Suplente 2
      <input type="text" name="suplente2" id="suplente2" />
      <br />
      <br />
      Suplente 3
      <input type="text" name="suplente3" id="suplente3" />
      <br />
      <br />
      Mail TL    
      <input type="text" name="mailtl" id="mailtl" />
      <br />
      <br />
      Password</span><span class="Estilo4">
      <input type="password" name="password" id="password" />
      </span><br />
    </div>
    <input type="hidden" name="MM_insert" value="form1" />
    </label>
  </form>
  <p align="left" class="Estilo4">&nbsp;</p>
  <p align="left" class="Estilo4">&nbsp;</p>
</div>
<p align="left" class="Estilo4">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
Bueno es mi primer POST en el Foro espero que me puedan ayudar a solucionar mi Problema.

Desde ya muchas gracias por tomarte la molestia de leer.
  #2 (permalink)  
Antiguo 19/11/2009, 17:20
Avatar de darkasecas  
Fecha de Ingreso: marzo-2005
Ubicación: SantaCata, NL, Mexico
Mensajes: 1.553
Antigüedad: 19 años, 1 mes
Puntos: 77
Respuesta: Problema en creación de registro.

Dice que no encontro el archivo "sitio1/Connections/conex.php" lo tienes? en esa ruta?
  #3 (permalink)  
Antiguo 19/11/2009, 17:58
 
Fecha de Ingreso: noviembre-2009
Mensajes: 2
Antigüedad: 14 años, 5 meses
Puntos: 0
Respuesta: Problema en creación de registro.

Ese conexion.php esta ma ubicado pero donde lo tendria que tener en el host remoto?

Hay alguna manera de usar dream v para conectarme a la DB?
  #4 (permalink)  
Antiguo 20/11/2009, 09:39
Avatar de darkasecas  
Fecha de Ingreso: marzo-2005
Ubicación: SantaCata, NL, Mexico
Mensajes: 1.553
Antigüedad: 19 años, 1 mes
Puntos: 77
Respuesta: Problema en creación de registro.

Pues segun el codigo, conex.php debe estar en la ruta sitio1/Connections/ relativa al script register.php
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 22:16.