How to output content to a page I have a form on my page that is being submitted. I am implementing hook_form_submit and within that function I have a search algorithm that processes the entered data and returns a result. I would like to display that result on the page underneath the search box. For debugging purposes so far I've simply used drupal_set_message() but this is no permanent solution.
I am new to Drupal module development so I am unsure how to go about this.

Any help would be greatly appreciated!
I'm afraid I posted to quickly, my apologies.

After re-reading your post, I would advise you to work with an AJAX callback that returns te search results.

First of all you need to create a form api implementation that holds the ajax callback

$form['search']['client'] = array(
'#type' =&gt; 'textfield',
'#title' =&gt; t('Search Client'),
'#description' =&gt; t('Search for an existing client'),
'#autocomplete_path' =&gt; 'searchclient/autocomplete',
);

$form['submit'] = array(
'#type' =&gt; 'submit',
'#value' =&gt; t('Search'),
);


Then you need to make sure that 'searchclient/autocomplete' is registered as a valid menu path (hook_menu) like this for example:

/**
* @return array
* Implements hook_menu().
*/
function your_project_menu() {
$items = array();

$items['searchclient/autocomplete'] = array(
  'title' =&gt; t('AutoComp Menu'),
  'page callback' =&gt; 'your_project_search_client',
  'access arguments' =&gt; array('access content'),
  'type' =&gt; MENU_CALLBACK,
);

  return $items;
}


After this you need to create your page callback function that will actually return the content to the page:

function your_project_search_client($string) {

  $matches = array();

  // do what you want here

  drupal_json_output($matches);
  exit;
}


As some extra info:

-> $string is the entered search text in the form element
-> $matches holds the data to be returned to the screen.

More information on ajax callbacks can be found here:

https://api.drupal.org/api/drupal/includes%21ajax.inc/group/ajax/7
https://www.drupal.org/node/2046693