Forms not updating default value on GET

Alright, hoping someone can help me on this which is driving me mad.

So I have a page with JS tabs, and each tab has forms. The main page has forms that are autofilled based on MySQL values. So here’s what the first tab contains:

[php]while($row = mysql_fetch_array($result))
{

echo "






”;
echo “”;
echo “”;
echo “”;[/php]

That goes on for quite some time, but you get the idea. Basically I’m matching up the stocknum field, and outputting all of the other fields autofill based on this. With the exception of stocknum, all of these fields are editable. When the user submits this form, it goes to a page that updates the variables based on the changes. This works great. I have no questions here.

The next tab is pretty much the same, with a few changes. Firstly, the form doesn’t show up until the user selects from a drop down list, and it dynamically changes a div to show the appropriate forms. The second part is this:

[php]echo "

[/php]

The difference here is that there is a loop that just says while there are rows, $variable[$i] = row[‘variable’]. It of course has an auto increment. Then the default values are based on that array instead of the raw row[‘variable’] value. This is also working correctly, these forms are filled with what I expect.

The problem comes when I pass these values to update. I use the same submit button, so the values are sent the exact same way. But on this form, when I change these values in the form, the changes aren’t being sent to the page to update the table. The page is still getting the default values that I’m showing in the forms.

I know that was kind of a confusing question, but what I’m trying to figure out is the fact that I have this in a div, or that it’s dynamic content stopping this from working? The default values are being passed, so that’s not an issue, but it’s not taking my changes!


General

Nutrition

Vendor

";
        echo "<center><table border=0 width=90% cellpadding=0 cellspacing=0>"; 

echo “

Stock Number: <input readonly type=‘text’ name=‘stocknum’ value=” . $row[“stocknum”] . “>Stock Description: <input type=‘text’ name=‘stockdesc’ value=” . $row[“stockdesc”] . “>
Calories: &nbsp
Sponsor our Newsletter | Privacy Policy | Terms of Service