How to print external html output in form_submit I have written a form that accepts user's input and based upon the input queries an external site and extracts the html of the result page from the external site. Is there a way to print html inside the form submit so that the results would appear on my drupal site. Following is my form_submit. (Drupal 7 is the version that I am working with)

   function tripal_search_form_submit($form, &amp;$form_state) {
    //debug($form_state);
    switch ($form_state['triggering_element']['#name']) {
     case 'submit':
     $string=$form_state['input']['string'];
     $organism=$form_state['input']['dropdown'];
     $some_var = file_get_contents("http://legumeinfo.org/gb2/gbrowse/$organism/?q=$string");
     print $some_var //This is were I need help
     break;
     case 'reset':
     $form['items']['name'] = array(
     '#type' =&gt; 'markup',
     '#value' =&gt; '&lt;input class="form-button" value="Reset" type="reset"&gt;',
     '#weight' =&gt; 2000,
    );
   break;
  } 
}
You might try using the drupal api function drupal_set_message()

https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/drupal_set_message/7

so in your case:

drupal_set_message($some_var); // will display the rendered html as a status message