PHP Parse error: syntax error, unexpected 'post'
<p>I have a form which consists of a dropdown and when the user submits the Information, it gets submitted to a PHP Page. Now based on the Response the user has selected on the dropdown, I created another form and I am trying to submit the Information. My Question is, Is it possible to have a post method within a php file?</p>

<p>HTML</p>

<pre><code>&lt;form method="post" name="project_form" action="php/harvest_clientproject.php"&gt;
Client Name:
                        &lt;select id="clt" name="client_name"&gt;
&lt;option value="A"&gt;Client A&lt;/option&gt;
  &lt;option value="B"&gt;Client B&lt;/option&gt;

&lt;input  type="submit" value="Submit"&gt;

                        &lt;/form&gt;
</code></pre>

<p>PHP File 1-Clientproject.php</p>

<pre><code>    $client_id_dropdown=$_POST['client_name'];
    echo $client_id_dropdown;

    /*Convert String to Integer */

    $client_id_dropdown_int=(int) $client_id_dropdown;


       /*Populating a dropdown with the list of projects from an array $data*/ 

      echo " &lt;form method= "post" name="project_form_2" action="harvest_clientproject2.php"&gt;
        &lt;select id="animal" name="project_name"&gt;";

           // Iterating through the product array
            foreach($data as $ $key=&gt;$fruit){

          echo "&lt;option value= "; echo  $fruit-&gt;{'id'}; echo "&gt;" ;echo $fruit-&gt;{'name'};echo"&lt;/option&gt;";

            }
            ?&gt; echo "
        &lt;/select&gt;
        &lt;input type="submit" value="Submit"&gt;

&lt;/form&gt;";
</code></pre>

<p>PHP File 2-harvest_clientproject2.php</p>

<pre><code>*Getting Project ID */

$projectid=$_POST['project_name'];

/*Convert String to Integer */

$projectid_int=(int) $projectid;


/*Generating Project Details and putting it in the form of a table */

$result = $api-&gt;getProject($projectid);
$data = $result-&gt;get( "data" );

echo "&lt;table border='1'&gt;
    &lt;tr&gt;&lt;td&gt;Project Name&lt;/td&gt;
    &lt;td&gt;Project Creation Date&lt;/td&gt;
    &lt;td&gt;Billable&lt;/td&gt;
    &lt;/tr&gt;";
        foreach($data as $key=&gt;$fruit) {
                        ?&gt;
                     &lt;tr&gt;&lt;td&gt;&lt;?php echo $fruit-&gt;name;?&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;?php echo $fruit-&gt;{'created-at'};?&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;?php echo $fruit-&gt;{'billable'};?&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;?php ;}
    echo "&lt;/table&gt;";
?&gt;
</code></pre>

<p>But once I try to do this it gives an error in the First PHP File saying "Syntax Error Unexpected Post". Kindly suggest on how could I overcome this Issue</p>