thanks for that that helps a great deal, can i just show you my code as i have been experiencing an error when inserting. This is the error message:
You have an error in your SQL syntax near ''', '19/ 02/ 2004', 'Richard Parker', 'testy boots', 'C:\PHP\uploadtemp\php232.' at line 1
And this is the code:
<?
// the path to the uploads folder
$file_dir = "c:/wwwroot/unitech/uploads/";
foreach($FILES as $file_name => $file_array) {
print "path: ".$file_array['tmp_name']."<br>\n";
print "name: ".$file_array['name']."<br>\n";
print "type: ".$file_array['type']."<br>\n";
print "size: ".$file_array['size']."<br>\n";
if (is_uploaded_file($file_array['tmp_name'])){
move_uploaded_file($file_array['tmp_name'],
"$file_dir/$file_array[name]") or die ("couldn't copy");
print "file was moved!<br><br>";
}
}
//now to take the uploaded doc and put path into database
$file = $file_array['tmp_name'];
$conn = mysql_connect("$glob_host", "$glob_user", "$glob_pass")
or die(mysql_error());
mysql_select_db("unitech",$conn) or die(mysql_error());
//create and issue the query
$sql = "INSERT INTO p_docs('', '$POST[date]', '$POST[section]', '$POST[doc_title]', '$file', '$POST[status]')";
$result = mysql_query($sql,$conn)or die(mysql_error());
?>
Kind Regards