Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/03/2013, 20:49
dastiven
 
Fecha de Ingreso: diciembre-2010
Mensajes: 46
Antigüedad: 13 años, 4 meses
Puntos: 0
Pregunta Error al registrar datos

Hola a todos, estoy tratando de ingresar datos a una base de datos mediante PHP pero me tira este error: Parse error: syntax error, unexpected '{' in C:\xampp\htdocs\Torneo\registrar.php on line 10

El codigo PHP que uso es este:

Código PHP:
<?php
    
    
include("conexion.php");

    if(isset(
$_POST['Nick']) && !empty($_POST['Nick']) &&
    (isset(
$_POST['Clan']) && !empty($_POST['Clan']) &&
    (isset(
$_POST['Pais']) && !empty($_POST['Pais']) &&
    (isset(
$_POST['Nombre']) && !empty($_POST['Nombre']))

    {
        
$con=mysql_connect($host,$user,$pw)
        or die(
"Se ha presentado un problema al intentar conectar con el servidor");

        
mysql_select_db($db,$con)
        or die(
"Se ha presentado un problema al intentar conectar con la base de datos");

        
mysql_query("INSERT INTO registro (Nick,Clan,Pais,Nombre)
        values('$_POST[Nick]','$_POST[Clan]','$_POST[Pais]','$_POST[Nombre]')"
,$con);
        echo 
"Registro completado";
    }

?>