You're welcome.
Quote:
|
I thought it was the "value" and that "name" was actually irrelevant
|
Nonono. The name is the only thing to reference the formfields. Which is logical since for most formfields, you wount know what value it will have when it is posted. In the formcollection, there is a variable-value pair for each formfield and it is the formfieldsname that will become the variablename.
In your case, i would name the formfieldsthe same as the variable that is used to insert the value into it. So
echo "<input type='hidden' name='item_code' value='$item_code'>";
because then you can use multi-purpose pages where you post the form to itself and do the fpormprocessing in the same page. If there is an invalid value and you want to reload the page, then you can simply have
echo ('<input type="hidden" name="item_code" value="'. $_POST['item_code'] . '" />';
and the formfield will always contain the last entered text (or it will be empty on first load), no matter how often you reload or post it.