title: if else condition, from contact form
body: <p>I have the following code, which takes the value from a drop down box for Sex: (Male/Female) on a contact form, if the value is male, it takes the user to male.html when the form is submitted, if anything else or female is selected, then it would take them to female.html.</p>
  
  <pre><code>if ($sex_from == "male")
  {
  $thankyou = "../male.html";
  }
  else
  {
  $thankyou = "../female.html"; // thank you page
  }
  </code></pre>
  
  <p>1.If the sex_from takes the value from a textbox, how do i code it so that if "male" is entered it will take them to male.html, regardless of capital letters etc?</p>
  
  <p>2.If the sex_from takes the value from a textbox, how do i code it so that it will only read the first 3 characters of the textfield, hence if mal/mall/malvtyj is written it will still take them to male.html, else female.html?</p>