get term id from term name

Hi i am trying to get term id from term name (title ).

 <?php     if ($  _SERVER["REQUEST_METHOD"] == "GET") {         // collect value of input field      $  nameb = $  _GET['fname2'];      $  namea = $  _GET['fname']; }  // $  nameb = Dolce+Gabana ;  // $  namea = Nike+Company;           ?> 

in above code php varibales equal to term name. But how can I get term id from term names. I use custom taxonomy