I have multiple forms in same php page. I am able to show and hide them based the drop down value selected But I have a variable called $url i want to have different value when each form loads
     <script>
      function validate(){
      var first = document.getElementById("first");
      var first-val = first.options[first.selectedIndex].value;
      var second = document.getElementById("seconed");
      var secondval = second.options[second.selectedIndex].value;
if(first-val == "Rear Tire" && secondval ==  "2WD")
{
document.getElementById("RA").style.display="";
document.getElementById("RB").style.display="none";
 var test = '<?php $url ="reartire"?>
} 
else if(first-val == "Rear Tire" && secondval ==  "MFWD")
   {
    document.getElementById("RA").style.display="none";
    document.getElementById("RB").style.display="";
   var test = '<?php $url ="fronttire"?>
   }
I tried adding
Inside the the first if - var test = '<?php $url ="yahoo.com"?>';
For the second if i added if- var test = '<?php $url ="google.com"?>'; But it only sees the the value of $url inside the second if
 
    