Cita:
Iniciado por parserxml lee la linea que comenté Código PHP:
){//<<--- ¿por que quitas esta parte? nada tiene que ver con el foreach
foreach($_POST['repro'] as $repro){
$var = $var.$repro.";";
}
foreach($_POST['repro2'] as $nombre){
$var = $var.$nombre.";";
}
deberia ser así
Código PHP:
Ver original<?php
include('../config.php');
if($_SESSION["logeado"] != "SI"){
header ("Location: ../index.php"); }
if($_SESSION["rango"] != "admin"){
header ("Location: ../index.php"); }
$msg = "";
$id = $_GET["id"];
if($_POST['enviar']){
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'])){
$sql = "INSERT INTO pelis (imagen,nombre,descripccion,genero) VALUES ('".$_POST['imagen']."','".$_POST['nombre']."','".$_POST['descripccion']."','".$_POST['genero']."')";
$sql2 = "INSERT INTO pelis2 (id_peli,embed,tamaño,descargar) VALUES ('".$_POST['id_anime']."','".$_POST['embed']."','".$_POST['tamaño']."','".$_POST['descargar']."')";
$msg = "Se agrego correctamente la pelicula";
} else { $msg = "Falta llenar algun dato"; }
}
?>