title: how to get two values to get result in php and ajax
body: <p>I'm trying to get two values from a form in php which is weight and gender 
  using jquery and ajax to show the price that corresponds to that gender and weight, </p>
  
  <p>the mysql table looks like this </p>
  
  <pre><code>gender range1  range2  price
  male     0       100     20
  male    101      200     30
  female   0       100     25
  female  101      199     46
  </code></pre>
  
  <p>the php form looks like this</p>
  
  <pre><code>  &lt;input type="text" name="gender" id="gender"&gt;
    &lt;input type="number" name="weight"&gt;
   price &lt;span id="result"&gt;&lt;/span&gt;
  &lt;input type="button" herf="javascript:;" onclick="getprice" value=""&gt;
  </code></pre>
  
  <p>the ajax function looks like this </p>
  
  <pre><code>    function getprice (gender, whieght) {
          var str_num {
          "gender" : gender,
          "weight" : weight
         };
               $.ajax({ data: str_num, 
          url: 'selectprice.php',
          type: 'post'
          beforeSend: function() {
       $("#result").html("in progress..");},
             succes: function (reponse){
           $("result").html(reponse);
                    })}}
  </code></pre>
  
  <p>the selectprice.php looks like this</p>
  
  <pre><code> $gender = $_GET["gender"];
    $weight = $_GET["weight"];
     $fetch = "SELECT * FROM table where gender like $gender and weight 
    &gt;range1 and &lt;range2"; 
  $result = mysqli_query($con, $fetch) or die("Ocurrio un error en la 
    consulta SQL");
  while ($row = $resul-&gt;fetch_assoc()) {
      echo "".$row["price"]."";
      }
     echo $result;
  </code></pre>
  
  <p>when I click the button nothing happens, I could really use some help, thanks in an advance</p>