Ver Mensaje Individual
  #6 (permalink)  
Antiguo 02/04/2012, 15:10
kfh1992
 
Fecha de Ingreso: diciembre-2011
Mensajes: 414
Antigüedad: 12 años, 3 meses
Puntos: 1
Respuesta: Insertar datos entre tablas relacionadas

ahora me sale esto

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 'laiete)' at line 1

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 ',amistad)' at line 1

Codigo php

<?php
include("../config.php");
session_start();
$id_album = $_POST['id_album'];
$id_usuario = $_POST['id_usuario'];
$album=$_POST['title_album'];
if (isset($_SESSION['user'])) {
//Crear album//
mkdir ("./album/$album");
mysql_query("insert into album1 values (" . $id_album . "," . $id_usuario . "," . $album . ")")or die (mysql_error());;
echo "Álbum creado correctamente";
include("formulario.php");
}else{
echo 'No puedes crear el álbum si no has Iniciado Sesión ';
}
?>