Passing hidden value to a php variable in input tag
<p>I am new to coding and pardon me if it a silly thing I am missing. I have searched through the forum &amp; did not find an answer that suits my need. I have 2 files: jobs.php &amp; jobprocess.php</p>

<p>Jobs.php goes as </p>

<pre><code>&lt;?php session_start();
include('dbConnect.php');
$q1="abc";  
$q2="pqr";  
$q3="xyz";  
$opportunity=29;    
echo "Opportunity is". $opportunity;
?&gt;

&lt;html&gt;
&lt;head&gt;
&lt;div align="center"&gt;

&lt;form method="post" method="post" action="jobprocess.php"&gt;


&lt;input type="text" name="q1" placeholder="&lt;?php echo $q1;?&gt;"&gt;&lt;br&gt;
&lt;input type="text" name="q2" placeholder="&lt;?php echo $q2;?&gt;"&gt;&lt;br&gt;
&lt;input type="text" name="q3" placeholder="&lt;?php echo $q3;?&gt;"&gt;&lt;br&gt;
&lt;input type="hidden" name="opportunity" value="&lt;?php echo $opportunity;?&gt;"&gt;


&lt;ul class="actions"&gt;
&lt;li&gt;&lt;input type="submit" name="submit" value="I would like to join!! "&gt;&lt;/li&gt;
&lt;/ul&gt;                           
&lt;/form&gt;                                 
&lt;/div&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>jobprocess.php goes with the code</p>

<pre><code>&lt;?php session_start();
include('dbConnect.php');


$opportunity = $_GET['opportunity'];
echo "opportunity is " . $opportunity;
?&gt;
</code></pre>

<p>Unfortunately, the above code is not defining value="29" for opportunity on 2nd page. Thanks in advance</p>