jenycz Posted March 23, 2010 Share Posted March 23, 2010 Hey Guys - I'm using ajax upload so users can upload more than one file at a time. I'm using a test site right now to get things worked out - http://kooziebelt.com/test/upload/demos/demo-jquery.htm . Here's the form... <form action="../../../callup/upload.php" method="post"> <p>Field 1 <input type="text" /></p> <div> <input id="button3" type="file" /> </div> <p>Uploaded files:</p> <ol class="files"></ol> <p> <input class="submit" type="submit" value="Submit form"/> </p> </form> Which calls this action... <?php $uploaddir = '../uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); if (move_uploaded_file($_FILES['userfile']['name'], $uploadfile)) { echo "success"; } else { // WARNING! DO NOT USE "FALSE" STRING AS A RESPONSE! // Otherwise onSubmit event will not be fired echo "It's entirely Eric's fault"; } ?> The uploads file is in the root, so I'm pretty sure I'm directed right with ../uploads/ but again, not too sure. Let me know if you need anything else, and other than that thank you in advance! - Jack 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.