Post Specific Uploader

Check if the argument is present, and if it isn’t return the default value:

if(!isset($_REQUEST['post_id']))
  return $upload;

// cast it to integer to avoid problems
$id = (int)$_REQUEST['post_id'];

...

Leave a Comment