Jump to content

File Upload From Remote Device


snowdog

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.