snowdog Posted January 23, 2013 Share Posted January 23, 2013 I will try to explain this and make it simple. I am having a iphone app and I have been able to interact with it no problems until it comes down to the file upload now. I have never done file uploads from a form before. There could be anywhere from 1-4 pictures and it will be: 4 $_FILES in a photos[] array, with the file names: wheelFL.jpeg wheelFR.jpeg wheelRL.jpeg wheelRR.jpeg Here is the code I have written so far, the files need to be uploaded to a directory called franchises/1 // SEND API if ( isset($_POST["send"])) { $dealer = $_POST['dealer']; $vinNumber = $_POST['vinNumber']; $carMake = ['carMake']; $carModel = ['carModel']; $carYear = ['carYear']; $franchise_id = $_SESSION['franchise_id']; // INSERT THE INFO INTO THE LOT DATABASE $SQL = "INSERT INTO lot (franchise_id,dealer_id,vinNumber,carMake,carModel,carYear,created,modified) VALUES ('$franchise_id','$dealer_id','$vinNumber','$carMake','$carModel','$carYear',NOW(),NOW())"; $result = mysql_query($SQL) or die('Query failed: ' . mysql_error()); $lot_id = mysql_insert_id(); // UPLOAD THE PICTURES OF THE RIMS } I am feeling completely lost on the file upload thing here. Thanks for any help. Snowdog Quote Link to comment https://forums.phpfreaks.com/topic/273560-file-upload-from-remote-device/ 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.