Multiple Form

Rexmonster

New Member
Hi guys,

I am trying to create a php page which lists job vacancies, and beside each vacancy I want to have an 'apply' button which links to another page containing the main contact form. Each 'apply' button needs to pass the title of the relevant job vacancy to the main contact form.

Here is what I have currently. It's not working so I wondered if someone could point me in the right direction please.

Here is the vacancies page (I have removed all but the relevant part):

PHP:
<p>Part Time Job - Ref AS02Z</p>
<form action="perform.php" method="post">
<input type="hidden" name="vacancy" value="AS02Z" />
<input name="submit" type="image" src="../images/notices/enquire.gif" /> 
</form>
<hr />
<p>Part Time Job - Ref AS03X</p>
<form action="perform.php" method="post">
<input type="hidden" name="vacancy" value="AS03X" />
<input name="submit" type="image" src="../images/notices/enquire.gif" /> 
</form>

Here is the main contact form which I am trying to pass the vacancy value to (I have removed all but the relevant field):

PHP:
<form action="form_enquiry.php" method="post">
<table>
    <tr class="top">
      <td>Which vacancy are you interested in? </td>
      <td><input type="text" name="vacancy" value="<?php $_POST['vacancy'] ?>" /></td>
    </tr>
  </table>
</form>

Cheers, R.
 
Last edited:

redonion

New Member
Have you tried
Code:
<?php echo $_POST['vacancy'];  ?>

In the second code snippet?
That may be the problem.
 
Top