title: PHP form validation using javascript
body: <p>I am developing an application in using php and mysql.I have written a javascript code for form validation but its working .</p>
  
  <pre><code>     function checkForm()
          { if(document.Form1.Gestational_age.value=="")
                  {
                     alert('Please select an option for Gestational age in weeks ') ;
                     return false;
                  }
              else if(document.Form1.PRBC.value=="")
                  {
                      alert('Please select an option for PRBC transfusion ');
                      return false;
                  }
              else if(document.Form1.milk_feeding.value=="")
                  {
                      alert('Please select an option for Human milk feeding at both day 7     and day 14 of life');
                      return false;
                  }
      }
     &lt;/script&gt;
  
      &lt;title&gt;GutCheckNEC for infants &lt; 1500 grams at birth Gephart,2012&lt;/title&gt;
  
     &lt;/head&gt;
     &lt;body&gt;
  
      &lt;div&gt;&lt;b&gt;GutCheckNEC   for infants &lt; 1500 grams at birth Gephart, 2012&lt;/b&gt;&lt;/div&gt;
      &lt;br&gt;
      &lt;form name="Form1" method="post" action ="Form1.php" onSubmit="return checkForm();"&gt;
          1.&amp;nbsp;&amp;nbsp;&amp;nbsp Gestational age in weeks&amp;nbsp;&amp;nbsp;&amp;nbsp
           &lt;input type="radio" id="Gestational_age" name="Gestational_age" value="0-27"/&gt;0-27
           &lt;input type="radio" name="Gestational_age" value="28-31"/&gt;28-31
           &lt;input type="radio" name="Gestational_age" value="&gt;32" /&gt;32
           &lt;br&gt;
  
          2.&amp;nbsp;&amp;nbsp;&amp;nbsp PRBC transfusion&amp;nbsp;&amp;nbsp;&amp;nbsp
          &lt;input type="radio" id="PRBC" name="PRBC" value="Yes"/&gt;Yes
           &lt;input type="radio" name="PRBC" value="No"/&gt;No
           &lt;br&gt;
          3.&amp;nbsp;&amp;nbsp;&amp;nbsp Human milk feeding at both day 7 and day 14 of life&amp;nbsp;&amp;nbsp;&amp;nbsp
          &lt;input type="radio" id="milk_feeding" name="milk_feeding" value="Yes"/&gt;Yes
           &lt;input type="radio" name="milk_feeding" value="No"/&gt;No
           &lt;br&gt;
  
       &lt;input type="submit" name="submit" value="Next"/&gt;
      &lt;/form&gt;
      &lt;/body&gt;
     &lt;/html&gt;
  </code></pre>
  
  <p>This s the sample of my code.Could you please hel,why my javascript part is not working..</p>