Ver Mensaje Individual
  #8 (permalink)  
Antiguo 19/12/2011, 08:23
Avatar de CesarHC
CesarHC
 
Fecha de Ingreso: junio-2011
Ubicación: localhost
Mensajes: 566
Antigüedad: 12 años, 11 meses
Puntos: 56
Respuesta: Problema con todo PHP

Tienes muchos errores esto es lo que logre corregir.

Código PHP:
Ver original
  1. <?php
  2.  
  3. include ("Conexion.php");
  4.    
  5.     if(isset($_POST['Nombre']) && !empty($_POST['Nombre']) &&
  6.     isset($_POST['Posicion']) && !empty($_POST['Posicion']) &&
  7.     isset($_POST['Media']) && !empty($_POST['Media']) &&
  8.     isset($_POST['Eoriginal']) && !empty($_POST['Eoriginal']) &&
  9.     isset($_POST['Enuevo']) && !empty($_POST['Enuevo']))
  10.     {
  11.    
  12.   $conexion = mysql_connect($host,$user,$pw) or die("Problema al conectar el Host");
  13.   mysql_select_db($conexion,$bd)or die("Problemas al conectar la bd");
  14.    
  15.     mysql_query("INSERT INTO basejugadores (NOMBRE,POSICION,MEDIA,EORIGINAL,ENUEVO)
  16.    VALUES (".$_POST['Nombre'].",".$_POST['Posicion'].",".$_POST['Media'].",".$_POST['Eoriginal'].",".$_POST['Enuevo']."",$conexion);
  17.     echo "datos insertados correctamente";
  18.      }
  19.     else
  20.      {
  21.     echo "problema al insertar los datos";
  22.     }
  23. ?>
__________________
Solo la práctica no te traicionara ¡¡¡¡¡¡

Seguir el camino tu debes PHP The Right Way.