Foros del Web » Programando para Internet » PHP »

NO funciona creacion de cuentas T.T

Estas en el tema de NO funciona creacion de cuentas T.T en el foro de PHP en Foros del Web. Weno estoy haciendo un proyecto de un juego, qe ya lo e dciho en otro post y estamos intentando hacer la creacion de cuentas mediante ...
  #1 (permalink)  
Antiguo 02/05/2009, 05:41
 
Fecha de Ingreso: mayo-2009
Mensajes: 30
Antigüedad: 15 años
Puntos: 3
Pregunta NO funciona creacion de cuentas T.T

Weno estoy haciendo un proyecto de un juego, qe ya lo e dciho en otro post y estamos intentando hacer la creacion de cuentas mediante php pero no funciona :S

la info esta bien, osea la contraseña, el host, la db, la tabla...
Weno aqui os paso los .phps de creacion:

Cita:
Singup.php


<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<?php require_once('Connections/host.php'); ?>
<?php
mysql_select_db($database_host, $host) or die('No pudo seleccionarse la BD.');
$consulta = 'SELECT * FROM cuentas';
$cuenta=$_GET['Cuenta'];
$pass=$_GET['Pass'];
$email=$_GET['Email'];
$qry2 ="INSERT INTO cuentas VALUES ('$cuenta', '$pass', '$email', '0', '0', '0')";
$result = mysql_query ($qry2, $cxn)
or die ("Could not execute the query." . mysql_error());
mysql_close($host);
header("Location: crear.php");
?>
</body>
</html>
Cita:
Crear.php



<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Infernal Strike :: Developers</title>
</head>

<body>
<FORM ACTION="singup.php">
<br>
<br>
<br>
<center>
<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1>
<TR>
<TD>Nombre Cuenta:</TD>
<TD><INPUT TYPE="text" NAME="Cuenta" SIZE="20" MAXLENGTH="30"></TD>
</TR>
<TR>
<TD>Contraseña:</TD>
<TD><INPUT TYPE="text" NAME="Pass" SIZE="20" MAXLENGTH="30"></TD>
</TR>
<TR>
<TD>Email:</TD>
<TD><INPUT TYPE="text" NAME="Email" SIZE="20" MAXLENGTH="30"></TD>
</TR>

</TABLE>
<br>
<INPUT TYPE="submit" NAME="accion" VALUE="Grabar">
</FORM>
</center>
<hr>
<br>
<br>
<br>
<center>
<?php require_once('Connections/host.php'); ?>
<?php
// seleccion de base de datos
mysql_select_db($database_host, $host) or die('No pudo seleccionarse la BD.');

$consulta = 'SELECT * FROM cuentas';
$resultado = mysql_query($consulta) or die('La consulta fall&oacute;: ' . mysql_error());

?>
<br>
<br>
<br>
</center>
<hr>
<br>
<br>
<br>
<center><TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1>
<TR><TD>&nbsp;<B>Id</B>&nbsp;</TD><TD>&nbsp;<B>Nombre Cuenta</B></TD><TD>&nbsp;<B>Email</B>&nbsp;</TD><TD>&nbsp;<B>Activada?</B>&nbsp;</TD><TD>&nbsp;<B>GM?</B>&nbsp;</TD><TD>&nbsp;<B>Baneado?</B>&nbsp;</TD></TR>

<?php
while($row = mysql_fetch_array($resultado)) {
printf("<tr><td>&nbsp;%s</td> <td>&nbsp;%s&nbsp;</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td></tr>",$row["Id"], $row["Cuenta"], $row["Email"], $row["Activado"],$row["GM"],$row["Baneado"]);
}
mysql_free_result($resultado);

?>

</table></center>
<?php

mysql_close($host);
?>

</body>
</html>

Cita:
Luego en connections/host.php estan:
$hostname_host = "****";
$database_host = "****";
$username_host = "****";
$password_host = "****";
$host = mysql_pconnect($hostname_host, $username_host, $password_host) or trigger_error(mysql_error(),E_USER_ERROR);
Me podeis decir que falla y como solucionarlo porfabor?
Me dice could not execute the query o algo asi.
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 19:07.