title: Error on posting data to server
body: <p>when i am trying to post the data i am getting the same error many times like undefined variable. i don't where is the error and even the data is not getting posted to database. i hope you will help to solve this error. if there are modifications please let me know.</p>
  
  <p><strong>File.php</strong></p>
  
  <pre><code>&lt;form action="/create" method="post"&gt;
  &lt;input type="hidden" name="_token" value="&lt;?php echo csrf_token(); ?&gt;"&gt;
  
  &lt;div class="form"&gt;
      &lt;h3&gt;Lead Information&lt;/h3&gt;
      &lt;input type="text" name="fname" placeholder="First Name"/&gt;
      &lt;input type="text" name="lname" placeholder="Last Name"/&gt;
      &lt;input type="text" name="desig" placeholder="Designation"/&gt;
      &lt;input type="email" name="email" placeholder="Email ID"/&gt;
      &lt;input type="text" name="telephone"placeholder="telephone"/&gt;
      &lt;input type="text" name="mobile" placeholder="Mobile"/&gt;
      &lt;input type="text" name="linkedin"placeholder="Linked In"&gt;
      &lt;select name="priority"&gt;
        &lt;option &gt;Priority&lt;/option&gt;
        &lt;option &gt;TBD&lt;/option&gt;
        &lt;option &gt;Hot&lt;/option&gt;
        &lt;option &gt;Warm&lt;/option&gt;
        &lt;option&gt;Cold&lt;/option&gt;
        &lt;option&gt;Dead&lt;/option&gt;
      &lt;/select&gt;
      &lt;select name="leadsta"&gt;
        &lt;option &gt;Lead Status&lt;/option&gt;
        &lt;option &gt;Attempt to Contact&lt;/option&gt;
        &lt;option &gt;Contact in Future&lt;/option&gt;
        &lt;option&gt;Contacted&lt;/option&gt;
        &lt;option&gt;Engaged in dialogue&lt;/option&gt;
        &lt;option&gt;Junk Lead&lt;/option&gt;
        &lt;option&gt;Lost Lead&lt;/option&gt;
        &lt;option&gt;Not Contacted&lt;/option&gt;
        &lt;option&gt;prequalified&lt;/option&gt;
      &lt;/select&gt;
  &lt;input type="text" name="skype"placeholder="Skype"&gt;
  &lt;/div&gt;
  &lt;div class="form"&gt;
          &lt;h3&gt;Company Information&lt;/h3&gt;
          &lt;input type="text" name="cname"placeholder="Comapny Name"/&gt;
          &lt;input type="url" name="website"placeholder="Website"/&gt;
          &lt;input type="text" name="domain"placeholder="Domain"/&gt;
          &lt;input type="text" name="anualrev"placeholder="Annual Revenue"/&gt;
          &lt;input type="text" name="nemp"placeholder="No. of Employess"/&gt;
          &lt;input type="text" name="street"placeholder="Street"/&gt;
          &lt;input type="text" name="city"placeholder="City"&gt;
          &lt;input type="text" name="state"placeholder="State"&gt;
          &lt;input type="text" name="zip"placeholder="Zipcode"&gt;
          &lt;input type="text" name="country"placeholder="Country"&gt;
          &lt;input type="text" name="gdesc"placeholder="General Description"&gt;
      &lt;input type="text" name="cskype"placeholder="Skype"&gt;
      &lt;br&gt;
  
    &lt;button input type="submit" name="submit"value="Add"&gt;Submit&lt;/button&gt;
  
        &lt;/form&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p><strong>Contoller</strong></p>
  
  <pre><code> &lt;?php
  
    namespace App\Http\Controllers;
  
     use Illuminate\Http\Request;
     use DB;
     use App\Http\Requests;
  
  
   class crmcontroller extends Controller
  {
    public function addleads(){
     return view('forms.leads.add');
   }
    public function insert(Request $request){
    $name = $request-&gt;input('forms.leads.add');
    DB::insert('insert into leadlist (fname,lname,$desig,email,telephone,mobile,linkedin,priority,ledsta,skype,cname,website,domain,anualrev,nemp,street,city,state,zip,country,gdesc,cskype) values(?)',[$fname,$lname,$desig,$email,$telephone,$mobile,$linkedin,$priority,$ledsta,$skype,$cname,$website,$domain,$anualrev,$nemp,$street,$city,$state,$zip,$country,$gdesc,$cskype]);
  echo "Record inserted successfully.&lt;br/&gt;";
  echo '&lt;a href="/insert"&gt;Click Here&lt;/a&gt; to go back.';
   }
  }
  </code></pre>
  
  <p><strong>routes.php</strong></p>
  
  <pre><code>Route::get('leadsadd','crmcontroller@addleads');
  Route::post('create','crmcontroller@insert');
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/eRhjp.jpg" rel="nofollow noreferrer">output</a></p>
  
  <p>Thanks in advance for your help.</p>