Foros del Web » Programando para Internet » PHP »

problema tipo: T_ENCAPSED_AND_WHITESPACE

Estas en el tema de problema tipo: T_ENCAPSED_AND_WHITESPACE en el foro de PHP en Foros del Web. Hola.. Cuando intento entrar a mi pagina ( http://neoparty.iespana.es/usuarios/registro.php < code mas abajo > ) me aparece el error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, ...
  #1 (permalink)  
Antiguo 26/10/2007, 21:17
 
Fecha de Ingreso: julio-2006
Mensajes: 254
Antigüedad: 17 años, 9 meses
Puntos: 0
problema tipo: T_ENCAPSED_AND_WHITESPACE

Hola..

Cuando intento entrar a mi pagina ( http://neoparty.iespana.es/usuarios/registro.php < code mas abajo > ) me aparece el error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /www/sites/1/iespana.es/n/e/neoparty/site/usuarios/registro.php on line 48

Les marco con color cual es la linea 48 ( al del error )


ROJO = AREA DEL PROBLEMA

VERDE = RESTO DEL CODIGO PHP

AZUL = CODIGO HTML

Code:
Cita:
<?php
# FileName="..."
# Type="..."
# HTTP="..."
$hostname_neoparty = "...";
$database_neoparty = "...";
$username_neoparty = "...";
$password_neoparty = "...";
$neoparty = mysql_pconnect($hostname_neoparty, $username_neoparty, $password_neoparty) or trigger_error(mysql_error(),E_USER_ERROR);
?>
<?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 usuarios ('nombre', 'usuario', 'contraseña', 'email', 'genero', 'partypoints', 'user_neo') VALUES ('$HTTP_POST_VARS['nombre']', '$HTTP_POST_VARS['usuario']', '$HTTP_POST_VARS['contrasea']', '$HTTP_POST_VARS['email']', '$HTTP_POST_VARS['genero']', '$HTTP_POST_VARS['partypoints']', '$HTTP_POST_VARS['user_neo']');





mysql_select_db($database_neoparty, $neoparty);
$Result1 = mysql_query($insertSQL, $neoparty) or die(mysql_error());

$insertGoTo = "/correctamente.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
body {
background-color: #EEAD0E;
}
a:link {
color: #0000FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #0000FF;
}
a:hover {
text-decoration: none;
color: #0000FF;
}
a:active {
text-decoration: none;
color: #0000FF;
}
.Seccion {
font-family: "Comic Sans MS";
font-size: 12px;
color: #0000FF;
}
.Estilo3 {font-size: 18px}
.Estilo4 {font-size: 14px}
.Estilo7 {font-family: "Comic Sans MS"; font-size: 12px; color: #0000FF; font-weight: bold; }
.Estilo8 {font-size: 9px}
-->
</style>
</head>

<body>

<p align="center" class="Seccion Estilo3">Registrate!</p>

<p align="center" class="Seccion Estilo3">&nbsp;</p>
<p align="center" class="Seccion Estilo4">Seras registrado en el momento!</p>
<p align="center" class="Seccion Estilo4">&nbsp;</p>
<p align="center" class="Seccion Estilo4">&nbsp;</p>

<form action="<?php echo $editFormAction; ?>" method="post" name="form1" class="Seccion" id="form1">
<table align="center">
<tr valign="baseline">
<td nowrap="nowrap" align="right">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Nombre:</td>
<td><input type="text" name="nombre" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Usuario:</td>
<td><input type="text" name="usuario" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Contraseña:</td>
<td><input type="text" name="contrasea" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Email:</td>
<td><input type="text" name="email" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Genero:</td>
<td><input type="text" name="genero" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Partypoints:</td>
<td><input name="partypoints" type="hidden" id="hiddenField" value="5" />
Se agregaran 5</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">User en neo:</td>
<td><input type="text" name="user_neo" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">&nbsp;</td>
<td><input type="submit" value="Insertar registro" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
</form>
<p>&nbsp;</p>
<p align="center" class="Seccion Estilo4">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p class="Seccion">&nbsp;</p>
<p class="Seccion">&nbsp;</p>
<p align="right" class="Seccion">&nbsp;</p>
</body>



</html>

Espero que alguien me sepa ayudar

Muchas gracias
  #2 (permalink)  
Antiguo 26/10/2007, 22:10
 
Fecha de Ingreso: julio-2006
Mensajes: 254
Antigüedad: 17 años, 9 meses
Puntos: 0
Re: problema tipo: T_ENCAPSED_AND_WHITESPACE

Ya esta solucionado
  #3 (permalink)  
Antiguo 26/10/2007, 22:27
 
Fecha de Ingreso: julio-2006
Mensajes: 254
Antigüedad: 17 años, 9 meses
Puntos: 0
Re: problema tipo: T_ENCAPSED_AND_WHITESPACE

Ahora tengo otro error

Ver:

http://www.forosdelweb.com/f18/probl...1/#post2169079


Thanks :)
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 09:10.