miren me sale este error:
Código:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, categoria) VALUES (prueba, '
aqui esta el code completo aver que error encuentrann :P
Código PHP:
<?
include("../conectar.php");
include("funciones.php");
if(isset($_POST['titulo']) and isset($_POST['desc']) and isset($_POST['link']) and isset($_POST['foto']) and isset($_POST['cate'])) {
if($_POST['cate'] == 0) {
$titulo = $_POST['titulo'];
$cate = $_POST['cate'];
$desc = $_POST['desc'];
$link = $_POST['link'];
$foto = $_POST['foto'];
$sql = "INSERT INTO peliculas (titulo, link, foto, desc, categoria) VALUES ('$titulo', '$link', '$foto', '$desc', '$cate')";
mysql_query($sql) or die (mysql_error());
?>
<script language="javascript">
alert("Se la pelicula, Existosamente");
location.href = "index2.php?pag=peli";
</script>
<?
}else{
?>
<script language="javascript">
alert("No has elejido niguna categoria");
history.back();
</script>
<?
}
}else{
?>
<script language="javascript">
alert("ERROR!!!");
location.href = "index.php";
</script>
<?
}
?>