What should I do if I want to save a javascript variable value, say var a, inside a php script variable without using post/get method or ajax?
 <script>
  var count=3;
   $("#add_driver").click(function () { 
  $( "#add_driver_section").replaceWith( "<div class='wrap-input100 validate- 
 input bg1 rs1-wrap-input100' > <span class='label-input100'>Gender</span> 
 <div class='contact100-form-radio m-t-15'> <input class='input-radio100' 
  id='male-radio"+ count +"' type='radio' name='type-product"+ count +"' 
    value='male' checked='checked' > <label class='label-radio100' for='male- 
      radio"+ count +"'> Male </label></div><div class='contact100-form- 
      radio'> <input class='input-radio100' id='female-radio"+ count +"' 
      type='radio' name='type-product"+ count +"'  value='female' > <label 
      class='label-radio100' for='female-radio"+ count +"' > Female </label> 
       </div></div>");  
  count++;}
   );
</script>
i have edited my question to give you guys a little more perspective as to what i want to acheive. Here i first want to check if type-product"+ count + is set or not. if it is set then i want the radio button's selected attribute to have the value selected. 
 
     
     
    