Use $_POST after submit form I create a form and a page with controller in Drupal 8.

I want print value of my example input after submit form.

For example my input name is "Tel_number".

My code in controller page is:

&lt;?php
namespace Drupal\mymodule\Controller;
use Drupal\Core\Controller\ControllerBase;
class MymoduleController extends ControllerBase {
    public function mymodule() {
      $form['test'] = array (
         '#markup' =&gt; \Drupal::request()-&gt;request-&gt;get('Tel_number'),
      );
    return $form;
    }
}
?&gt;


But no resault print.
Your controller is in a new request. If you stored the data in the database retrieve it from there. If you did not store the data in submit in some place it is no longer available. You could use a session variable or a url query parameter to transfer the data from the form submit to the controller:

public function myFormSubmit($form, FormStateInterface $form_state) {
  ...
  $form_state-&gt;setRedirect('route_to_controller', [], ['query' =&gt; [
    'Tel_number' =&gt; '123456789',
  ]]);
}


and the controller

public function showNumber(Request $request) {

  $build['test'] = ['#markup' =&gt; $request-&gt;query-&gt;get('Tel_number')];

  return $build;
}