sailorsmokey Posted June 17, 2009 Share Posted June 17, 2009 Hi everyone, I'm trying to keep this so basic, and for some reason it's not working. (Okay, yes, we all know that it's not "some" reason - but really because sailorsmokey is not understanding the tutorials or the code she is trying to write.) All I want is the image from the HTML form to be loaded onto a directory on the site. Yes, I have changed permission on the directory to 777. I'm sure the problem is in the code I am trying to understand and duplicate from tutorials online. So, without being too brutal, could someone point out what I'm doing wrong? Here's the form code: <table border="0"> <form enctype="multipart/form-data" method="post" action="completemodify.php" > <tr><td valign="top"> UNDER CONSTRUCTION - NOT WORKING YET Additional Info Image (if you have one):</td><td colspan="2"> <input type="file" name="additionalpix" size="30" /> <tr colspan="2"> <input type="Submit" name="completemodify" value="Make the Above Changes"> </tr> </td></tr></table> Here's the processing code: <? $additionalpix=$_FILES['additionalpix']['tmp_name']; $additionalpix_name=$_FILES['additionalpix']['name']; $directory_addself=str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']); $adduploads_directory=$_SERVER['DOCUMENT_ROOT'] . $directory_addself . 'autism/additionalpix/'; $fieldname= 'additionalpix'; $adduploadfilename=$adduploads_directory.$_FILES[$fieldname]['name']; @move_uploaded_file($_FILES[$fieldname]['tmp_name'], $adduploadFilename); PS - Oh yes, just reading this it doesn't make sense to me. Again, I'm pretty sure I'm not understanding something key here. Any help/pointers/advice anyone could give would really give me something to go on here. Thank you in advance. 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.