[ic] Form to update database
DB
DB at M-and-D.com
Fri Feb 6 18:21:40 UTC 2009
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]
<FORM METHOD=POST ACTION="[process]">
<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.
Does anyone know if what I'm trying is possible, and if so, how?
DB
More information about the interchange-users
mailing list