Ver Mensaje Individual
  #7 (permalink)  
Antiguo 06/06/2011, 18:31
parserxml
 
Fecha de Ingreso: junio-2011
Mensajes: 7
Antigüedad: 12 años, 11 meses
Puntos: 0
Respuesta: error Invalid argument supplied

perdon olvide ponerlo completo pues el codigo es el siguiente:
Código PHP:
Ver original
  1. <?php
  2. include('../config.php');
  3. if($_SESSION["logeado"] != "SI"){
  4. header ("Location: ../index.php");
  5. }
  6. if($_SESSION["rango"] != "admin"){
  7. header ("Location: ../index.php");
  8. }
  9. $msg = "";
  10. $id = $_GET["id"];
  11. if($_POST['enviar']){
  12. if(!empty($_POST['nombre']) and !empty($_POST['imagen']) and !empty($_POST['genero'])  and !empty($_POST['id_anime']) and !empty($_POST['descargar']) and !empty($_POST['tamaño']) and !empty($_POST['embed']) and !empty($_POST['descripccion'])    ){
  13.  
  14.    
  15.     foreach($_POST['repro'] as $repro){
  16.         $var = $var.$repro.";";
  17.     }
  18.     foreach($_POST['repro2'] as $nombre){
  19.         $var = $var.$nombre.";";
  20.     }
  21.     $sql = "INSERT INTO pelis (imagen,nombre,descripccion,genero) VALUES ('".$_POST['imagen']."','".$_POST['nombre']."','".$_POST['descripccion']."','".$_POST['genero']."')";
  22.     $sql2 = "INSERT INTO pelis2 (id_peli,embed,tamaño,descargar) VALUES ('".$_POST['id_anime']."','".$_POST['embed']."','".$_POST['tamaño']."','".$_POST['descargar']."')";
  23.    
  24.     mysql_query($sql,$conex);
  25.     mysql_query($sql2,$conex);
  26.     $msg = "Se agrego correctamente la pelicula";
  27. } else { $msg = "Falta llenar algun dato"; }
  28. }
  29. ?>