ERROR
Warning: implode() [function.implode]: Bad arguments. in C:\AppServ\www\InsertarArchivo.php on line 23
Warning: implode() [function.implode]: Bad arguments. in C:\AppServ\www\InsertarArchivo.php on line 25
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 '),())' at line 1
este es mi formulario de logica
InsertarArchivo.php
Código PHP:
Ver original
<DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" /> <link type="text/css" rel="stylesheet" href="estilo.css"> <?php && ($_POST['codigo'] != "" || $_POST['nombre'] != "" || $_POST['version'] != "" || $_POST['Area'] != "" )) { $Codigo=$_POST['codigo']; $Nombre=$_POST['nombre']; $Version=$_POST['version']; $destino='archivos'; $nom_archivo = $_FILES['archivo']['name']; $tipo = $_FILES['archivo']['type']; $size = $_FILES['archivo']['size']; $tamano=$_FILES['file']['size']; if($tamano < 500){ require("Conexion.php"); $sql = "insert into `datos` (`Codigo`,`Nombre`,`Version`,`Adjunto`,`Area`,`Area2`,`Area3`) values('{$Codigo}','{$Nombre}','{$Version}','{$_FILES['archivo']['name']}', (".$Area."),(".$Area2."),(".$Area3."))"; echo "<pre>"; echo "</pre>"; echo '<center><b><h3>Se insertaron los datos correctamente</a></h3></b></center>'; echo '<center><b><h3><a href=CargarDocumento.php> Regresar </a></h3></b></center>'; }else { echo ("El tamaño es superior al permitido"); } }else { $sindatos = "<center><font color=\"red\" size=\"4\"><b>DEBE INGRESAR DATOS<b></font></center>"; include('CargarDocumento.php'); }
CargarDocumento.php ----> el formulario de presentacion
Código HTML:
Ver original
<DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"> <html> <head> </head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" /> <link type="text/css" rel="stylesheet" href="estilo.css"> <BODY> <center><?php if (isset($sindatos)) echo $sindatos; ?></center> <form action="InsertarArchivo.php" method="post" enctype="multipart/form-data" name="form1"> <tr> <td> <center><IMG SRC="imagenes/LOGO.jpg" WIDTH=120 HEIGHT=100></center> </td> require("Conexion.php"); $resultado=mysql_query("Select * from `area`"); while ($row = mysql_fetch_array($resultado)){ echo "<input type=\"checkbox\" name=\"Area[]\" value=\"".$row['Cod.Area']."\">".$row['Nombre_Area']."<br>"; } ?> </td> </tr> </form> </body> </html>
agradesco toda la ayuda posible