title: Unable to redirect to next page
body: <pre><code>form method="POST" action="myprofile.php" id='myformid&lt;?=$userid?&gt;' name="myprof"&gt;
              &lt;input type="hidden" value="&lt;?=$userid?&gt;" name="id"&gt;
  
                  &lt;a  onClick="document.getElementById('myformid&lt;?=$userid?&gt;').submit();" style="cursor:pointer"&gt;&lt;?=ucfirst($fname)." ".ucfirst($lname)?&gt;
              &lt;/a&gt;
  
  
  &lt;/form&gt;
  </code></pre>
  
  <p>I am using form and from current page I want to get redirected to myprofile.php but its not working.
  To cross check the code when I use alert in anchor tag as below</p>
  
  <pre><code>&lt;a  onClick="alert(document.getElementById('myformid&lt;?=$userid?&gt;'))" style="cursor:pointer"&gt;&lt;?=ucfirst($fname)." ".ucfirst($lname)?&gt;
                  &lt;/a&gt;
  </code></pre>
  
  <p>it returns null value...
  Can anyone suggest me any solution or what is going wrong ?</p>