Saludos xfxstudios,
Gracias por la aportación, antes de guardar los archivos en la BBDD com estoy haciendo ahora, prové de hacer-lo de la manera que comentas, pero no conseguí que me descargar el archivo a traves de un <a href... Adjunto a continuación los códigos que utilicé a ver si puedes decir-me el porqué no funciona.
Muchas gracias!!
EmpFrmCreacion.php
Código PHP:
Ver original<html>
<head>
<title></title>
<META http-equiv="Content-Type" CONTENT="text/html; charset=utf-8">
</head>
<body bgcolor="#F75353">
<?php
include '../header.php';
?>
<center>
<form name="Formulario" id="Formulario" title="Formulario" action="anticempcrear.php" method="post" enctype="multipart/form-data">
<table align="center" bgcolor="#A9E2F3">
<tr>
<tr>
<tr>
<tr>
<tr>
<th colspan="3"> <FONT SIZE=6>New RFQ:</font></th>
</tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<th>IdRFQ</th>
<td colspan="3"> <input type="text" name="txtidrfq" size="9" />
<th>Data</th>
<td colspan="3"> <input type="text" name="txtdata" size="9" />
</td>
<th>Project Part Number</th>
<td colspan="3"> <input type="text" name="txtproject_part_nombre" size="20" />
</td>
<th>Customer</th>
<td colspan="3"> <input type="text" name="txtcustomer" size="25"/></td>
<th>Category</th>
<td colspan="3"> <input type="text" name="txtcategoria" size="20" />
</td>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<th>RM Part Number</th>
<td colspan="3"> <input type="text" name="txtRM_part_number" size="23" />
</td>
<th>Suppliers</th>
<td colspan="3"> <input type="text" name="txtsupplier" size="20" />
</td>
<th>Price</th>
<td colspan="3"> <input type="text" name="txtprice" size="20" />
</td>
<th>Cry2</th>
<td colspan="3"> <input type="text" name="txtcry2" size="5" />
</td>
<th>MOQ</th>
<td colspan="3"> <input type="text" name="txtmoq" size="20" />
</td>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<th>Volume</th>
<td colspan="3"> <input type="text" name="txtvolume" size="23" />
</td>
<th>Delivery time</th>
<td colspan="3"> <input type="text" name="txtdelivery_time" size="20" />
</td>
<th>Investment</th>
<td colspan="3"> <input type="text" name="txtinvestment" size="25" />
</td>
<th>Cry</th>
<td colspan="3"> <input type="text" name="txtcry" size="5" />
</td>
<th>Timing</th>
<td colspan="3"> <input type="text" name="txttiming" size="20" />
</td>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<th>Responsible</th>
<td colspan="3"> <input type="text" name="txtresponisble" size="23" />
</td>
<th>Incoterms</th>
<td colspan="3"> <input type="text" name="txtincoterms" size="25" />
</td>
<th>Comments</th>
<td colspan="3"> <input type="text" name="txtcomments" size="25" />
</td>
<!-- MAX_FILE_SIZE debe preceder al campo de entrada del fichero -->
<input type="hidden" name="MAX_FILE_SIZE" value="300000" />
<!-- El nombre del elemento de entrada determina el nombre en el array $_FILES -->
Enviar este fichero: <input name="archivo" type="file" />
</tr>
<tr>
<td align="right"colspan="20" >
<input type="submit" value="SEND"/>
</td>
</tr>
</table>
</form>
</center>
<body>
</html>
EmpCrear.php
Código PHP:
Ver original<?php
include '../header.php';
?>
<?php
require_once ('../conexion.inc.php');
$db1 = @mysql_connect($servidor,$usuario,$password) or
die("Error al conectar al DBMS.");
// En versiones de PHP anteriores a la 4.1.0, debería utilizarse $HTTP_POST_FILES en lugar
// de $_FILES.
$dir_subida = '/localweb/subidas/S';
$fichero_subido = $dir_subida . basename($_FILES['archivo']['name']);
echo '<pre>';
echo "El fichero es válido y se subió con éxito.\n";
} else {
echo "¡Posible ataque de subida de ficheros!\n";
}
echo 'Más información de depuración:';
print "</pre>";
$IdRFQ = $_POST['txtidrfq'];
$Data = $_POST['txtdata'];
$Suppliers = $_POST['txtsupplier'];
$Price = $_POST['txtprice'];
$Cry2 = $_POST['txtcry2'];
$MOQ = $_POST['txtmoq'];
$Volume = $_POST['txtvolume'];
$Investment = $_POST['txtinvestment'];
$Cry = $_POST['txtcry'];
$Timing = $_POST['txttiming'];
$Incoterms = $_POST['txtincoterms'];
$Comments = $_POST['txtcomments'];
$q1= "INSERT INTO rfq (idrfq, data, suppliers, price, cry2, moq, volume, investment, timing, cry, incoterms)
values ('$IdRFQ','$Data', '$Suppliers', '$Price', '$Cry2', '$MOQ', '$Volume', '$Investment', '$Timing', '$Cry', '$Incoterms')";
$result = mysql_query($q1) or
die ("No se pudo ejecutar la consulta");
?>