[ic] Form to update database

Peter peter at pajamian.dhs.org
Sat Feb 7 00:43:56 UTC 2009

On 02/06/2009 10:21 AM, DB wrote:
> I have the below form in a search results page named inv_level.html. My
> goal is to use the form to update the quantity of an item in my
> inventory mysql table, then to show the updated value by refreshing the
> same page.
> [set mv_data_enable]1[/set]
> [tag flag write]inventory[/tag]
> <INPUT TYPE=HIDDEN NAME="mv_data_table"    VALUE="inventory">
> <INPUT TYPE=HIDDEN NAME="mv_data_key"      VALUE="sku">
> <INPUT TYPE=HIDDEN NAME="mv_data_function" VALUE="update">
> <INPUT TYPE=HIDDEN NAME="mv_update_empty"      VALUE="1">
> <INPUT TYPE=HIDDEN NAME="mv_data_fields" VALUE="sku,quantity">
> <INPUT TYPE=hidden NAME=sku VALUE="[itemlist-param code]]">
> <INPUT TYPE=hidden NAME=mv_doit VALUE=return>
> <INPUT TYPE=hidden NAME="mv_todo" VALUE="set">
> <INPUT TYPE="hidden" name="mv_nextpage" value="@@MV_PAGE@@">
> <INPUT TYPE=TEXT NAME="quantity" SIZE=10 VALUE="[itemlist-param qty]">
> <INPUT TYPE=submit>
> </FORM>
> The database update does indeed occur, however I end up on a page (named
> process.html) that's blank other than the template's code. If I hit Back
> then Reload, all appears as I want it to.
> When this search results page loads initially, the URL is shown as
> search.html and not inv_level.html, and I suspect this may be confusing
> my @@MV_PAGE@@ variable.

You may be right, try inv_level instead of @@MV_PAGE@@, then.


More information about the interchange-users mailing list