title: how to pass php variable value to action attribute of html form
body: <p>I want to pass php variable value as a action to html form. I am trying as follows, but it is not working.</p>
  
  <pre><code>&lt;?php
      $url='test.php';
  ?&gt;
  
  &lt;html&gt;
      &lt;body&gt;
          &lt;form name="upload" action="&lt;?=$url?&gt;" method="post" &gt;
              &lt;input type="submit" value="submit"&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>All this code are in one php file.</p>