Skip to content

Instantly share code, notes, and snippets.

@shawnsandy
Created July 1, 2014 17:27
Show Gist options
  • Select an option

  • Save shawnsandy/de6f5257f01d544c233b to your computer and use it in GitHub Desktop.

Select an option

Save shawnsandy/de6f5257f01d544c233b to your computer and use it in GitHub Desktop.
<?php
function _uploadLogo($imageName) {
$path = 'img/employer/logos/';
if (!empty($this->data['VirtualJobFairExhibitor'])) {
if(!move_uploaded_file($this->data['VirtualJobFairExhibitor']['logo']['tmp_name'], $path . $imageName)) {
return false;
}
} else {
if(!move_uploaded_file($this->data['Employer']['userfile']['tmp_name'], $path . $imageName)) {
return false;
}
}
return true;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment