Hello, I have a form like: <form method="post" action="/admin/post.php"> <div style="width:650px;text-align:right;"> ID: <input type="text" name="id" value="1" /><br/> Name: <input type="text" name="name" /><br/> Category: <select name="category"> <option value="html">HTML</option> <option value="wp">WP</option> </select><br/> Small Image:<input type="file" name="small_img_url" id="small_img_url" /><br/> Big Image:<input type="file" name="big_img_url" id="big_img_url" /><br/> HotFile: <input type="text" name="hotfile" value="" /><br/> FileSonic: <input type="text" name="filesonic" value="" /><br/> Easy-Share: <input type="text" name="easyshare" value="" /><br/> Demo: <input type="text" name="Demo" value="" /><br/> Active: <input type="radio" name="active" value="yes" checked>Yes <input type="radio" name="active" value="no">No </div> <textarea id="post" name="post" rows="15" cols="80" style="width: 100%"></textarea> <input type="submit" value="Submit" name="save" /> </form> HTML: Where Small Image and Big Image are there is a file upload, I need the code for post.php that will post "Small Image" to /home/sharing/public_html/images/small/ (or http://example.com/images/small/ and post "Big Image" to /home/sharing/public_html/images/big/ (or http://example.com/images/big/ The Image file will be JPG, PNG or GIF, the image file name needs to be set by $small_image_name and $big_image_name. Thanks Chris
first you need to add enctype="multipart/form-data" to your form tag as it is necessary to upload the file via your post
it must be the enctype problem. I forget to add it all the time google "php file upload" and you will get some good tutorials