RogerInHawaii Posted June 29, 2007 Share Posted June 29, 2007 I have a simple form on my page as follows: <form METHOD=post ENCTYPE="multipart/form-data"> <input TYPE="file" NAME="filename"> .. other input fields... </form> which produces a text control plus a Browse button which allows the user to either directly enter a file name or select a file by bringing up a browse dialog. After the user subsequently hits the Submit button for the form, in the processing of the form data I attempt to retrieve the file name that he has entered, with the following: <?php $TheFileName = $_POST['filename']; ?> but no matter what the user enters the retrieved file name is always empty. I can always get the value in other form fields, but never the one in the File field. What am I doing wrong? Quote Link to comment Share on other sites More sharing options...
corbin Posted June 29, 2007 Share Posted June 29, 2007 I'm assuming you're trying to upload files? If so, Google PHP uploads or something like that. The files are stored in the $_FILES array, and each key of that array breaks down a little further to offer information about the files and what not ;p. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.