I wish to make an upload form inside a Drupal block (with PHP-code enabled) and I wish the validation / treatment to be on the same block.
All I have found are either PHP specific code (creating a form and redirect to an 'upload.php' page) or Drupal module code (upload.inc with functions to create, submit and validate the form)...
What should I do?
There is the advanced block module that can help you place form inside a block. Could also try the form block module if that works for this situation depending on what the upload is for.
Custom Module: This can also be easily done via custom module. As this answer here recommends
the form array returned by
drupal_get_form
will be automatically rendered.yourmodule_form_function
is a function (in your module or an existing Drupal module) that returns the form array;