How do I pass a record ID from a form I've read to a new form in a different table
I'm developing a website for an airshow, as a volunteer(www.hollisterairshow.com) There is often a need for additional items that we would like to borrow for the airshow.
I am developing a facility whereby the airport manager can add items he needs to a list that will be displayed on the web site - this is working. Now I'm adding a page that will be displayed on the website so that anyone can respond to a need by clicking on an item in the list. Users are taken to a page which displays the selected item and shows a form where the user enters their contact info, quantity of items they can loan us etc. This form contains a hidden field which is the index for the table containing the needs and was the index used to display the item on this page. The selected item displays correctly but when the user submits their offer to help the need index always selects the first item in the needs recordset and not the index for the item selected by the user.
I think the code that sets up the hidden field in the submitted form is here:
<input type="hidden" name="needId" value="<?php echo $row_rsNeedsUnmet['needId']; ?>" />
The needId field is passed to this page using a URL parameter, I can see that it is working and correctly displaying the selected need but it's not being correctly transferred to this hidden field....sigh. I'm using PHP and MySQL.
I must be missing something blindingly obvious...
Thanks,
Tony
