parse.com-php-library
parse.com-php-library copied to clipboard
Creating a php uploader with parse?
trafficstars
Hello,
I seem to be a novice with respect to php, so I am having trouble understanding your sample of upload.php. I have a php upload script for file uploading, but how would I integrate that with parse? I am trying to create a php uploader that would allow for someone to upload a csv document that would then be uploaded to parse and then stored into the class 'dining'. Some sample columns are date, day, and breakfast.
If you could provide any feedback or help that would be greatly appreciated!
Sure check out the below code:
//First parse your csv in an array
//great example here: http://stackoverflow.com/a/8353265/718430
//Next goes your parse code
foreach($csv_data as $data){
$object = new parseObject('dining');
$object->date = $data['date'];
$object->day = $data['day'];
$object->breakfast = $data['breakfast'];
$object->save();
}
Check out some object examples here: https://github.com/apotropaic/parse.com-php-library/blob/master/tests/parseObjectTest.php