> All I am trying to do is insert the file name, not the file. The file is > being uploaded to the server in a specific location. All I need is the > filename inserted into the database. I've gotten the upload part to work and > everything I just can't get the file name inserted for God knows what > reason. I removed the upload code and am simply trying to insert the > filename and userid into the database. The userid goes in but I cannot get > the file name inserted. > > Here is the form: > <form action="<?php echo $editFormAction; ?>" method="post" > enctype="multipart/form-data" name="form1"> > <input name="filename" type="file" id="filename"> > <input name="userid" type="hidden" id="userid" > value="<?php echo $row_rsUSER['id']; ?>"> > <input type="submit" name="Submit2" value="Upload" > disabled> > <input type="hidden" name="MM_insert" value="form1"> > </form>
The uploaded file name will be $HTTP_POST_FILES["filename"]["name"] -- use that rather than $_POST["filename"]. HTH -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php