title: Laravel Form Post does not go to route
body: <p>I'm checking employee number and display employee name first before proceeding to registration form wherein employee number and employee name will be automatically filled in the registration form.</p>
  <p>blade</p>
  <pre><code> @if($employeenumber !== NULL)
                  &lt;form class=&quot;regbox&quot; method=&quot;POST&quot; action=&quot;{{ route('register') }}&quot;&gt;
                      @csrf
                      @method('POST')
                      &lt;h1&gt;Validate Employee Number&lt;/h1&gt;
                      &lt;div class=&quot;form-group row&quot;&gt;
                          &lt;div class=&quot;col-md-12&quot;&gt;
                              &lt;input id=&quot;employeenumber &quot; type=&quot;text&quot; class=&quot;form-control{{ $errors-&gt;has('employeenumber ') ? ' is-invalid' : '' }}&quot; name=&quot;employeenumber &quot; value=&quot;{{ $employeenumber }}&quot; required placeholder=&quot;01-234567&quot; readonly&gt;
                              &lt;input id=&quot;employeename&quot; type=&quot;hidden&quot;  name=&quot;employeename&quot; value=&quot;{{ $employeename}}&quot;&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;    
                      &lt;h5&gt;This account belongs to Mr./Ms. &lt;b&gt;{{$employeename}}&lt;/b&gt;.&lt;/h5&gt;
                      &lt;input type=&quot;submit&quot; name=&quot;&quot; value=&quot;Confirm&quot; &gt;
                  &lt;/form&gt;
                      @else
                      &lt;Div class=&quot;regbox&quot;&gt;
                      &lt;h1&gt;Validate Employee Number&lt;/h1&gt;
                      &lt;div class=&quot;form-group row&quot;&gt;
                          &lt;div class=&quot;col-md-12&quot;&gt;
                              &lt;input id=&quot;employeenumber &quot; type=&quot;text&quot; class=&quot;form-control{{ $errors-&gt;has('employeenumber ') ? ' is-invalid' : '' }}&quot; name=&quot;employeenumber &quot; value=&quot;{{ $employeenumber  }}&quot; required placeholder=&quot;01-234567&quot; readonly&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;    
                      &lt;h5 style=&quot;color:red;&quot;&gt;Employee Number does not exist.&lt;/b&gt;.&lt;/h5&gt;
                      &lt;a href=&quot;{{ route('checker') }}&quot;&gt;&lt;input type=&quot;button&quot; name=&quot;&quot; value=&quot;Back&quot; &gt;&lt;/a&gt;
                      &lt;/div&gt;
                      @endif     
  </code></pre>
  <p>Controller</p>
  <pre><code>class CheckAccount extends Controller
  {
      public function check(Request $request)
      {   
              $employeenumber= $request-&gt;input('employeenumber');
              $data = array(
              'employeenumber'          =&gt; $employeenumber,
              'employeename'    =&gt; Account::where('masterlist', $employeenumber)-&gt;value('employeename'),
          );
  
          return view('auth.check')-&gt;with($data);
      }
  
      public function checker()
      {   
              return view('checker');
      }
  
  }
  </code></pre>
  <p>When submitting the form, it just refreshes the page or it just redirects back to the page and does not proceed to the registration page. When the page refreshes, my error message <code>&lt;h5 style=&quot;color:red;&quot;&gt;Employee Number does not exist.&lt;/b&gt;</code> is displayed so the POST values are lost.</p>