$_files es muy error
Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /Applications/XAMPP/xamppfiles/htdocs/cocinasorda/Connections/conexion.php on line 23
Column 'Foto' cannot be null
Código PHP:
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO Noticia (user_id, Foto, Video, Temas, text, Nombre) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['user_id'], "text"),
GetSQLValueString($_FILES['Foto'], "text"),
GetSQLValueString($_POST['Video'], "text"),
GetSQLValueString($_POST['Temas'], "text"),
GetSQLValueString($_POST['text'], "text"),
GetSQLValueString($_POST['Nombre'], "text"));
Código PHP:
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1" enctype="multipart/form-data">
<table align="center">
<tr valign="baseline">
<td height="32">Titulo<br/><input type="text" name="Temas" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td>Foto<br/><input type="file" name="Foto" id="Foto"></td>
</tr>
<tr valign="baseline">
<td>Escribe<br/><textarea name="text" cols="60" rows="10">text…..</textarea></td>
</tr>
<tr valign="baseline">
<td>http://youtu.be/<input type="text" name="Video" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td><input type="submit" value="Insertar registro" /></td>
</tr>
</table>
<input name="Nombre" type="hidden" value="<?php echo $row_Recordset1['Nombre']; ?> <?php echo $row_Recordset1['Apellido']; ?>" />
<input type="hidden" name="user_id" value="<?php echo $row_Recordset1['id']; ?>" />
<input type="hidden" name="MM_insert" value="form1" />
</form>