MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

MV coding: FORM reload problem.



Hi,

I have a page with SQL database access.
I have a multiple variable set for this form.
When I reload the page with browser's RELOAD button 
I see that function is repeated.
What can I do? :)

This is a code:

.....

[if session logged_in]

[set name="Create" int]
mv_data_function=insert
code=[tag time]%Y%m-%d%H%M%S[/tag]
image= 
price= 
description=New
rdescription=
page=[calc][scratch last]+1[/calc]
update=1
[/set]

[set name="Save" int]
mv_data_function=update
image=[scratch out_file]
code=[loop-code]
page=[scratch current]
[/set]

[set name="Delete" int]
mv_data_function=delete
mv_data_verify=Yes
code=[loop-code]
page=[scratch prev]
update=1
[/set]

	<form method=post action="[process-target]">
	<input type=hidden name=mv_data_table value="products">
	<input type=hidden name=mv_data_key value="code">
	<input type=hidden name=mv_data_fields value="code description
rdescription image price">
	<input type=hidden name=mv_doit value="set">
	<input type=hidden name=mv_update_empty value="1">
	<input type=hidden name=mv_nextpage value=catalog>
[/if]

<tr>
<td rowspan=5 align=center>
[if_loop_field image]
	[page [loop-code]]<IMG SRC="__IMAGE_DIR__/[loop_field image]">[/page]
[/if_loop_field]
</td>
<td><b>Code:</b></td>
<td>[loop-code]</td>
</tr>
<tr>
<td><b>Description:</b></td>
<td>
[if session logged_in]
	<input type=text size=30 name="description" value="[loop-description]">
[else]
	[loop-description]
[/else]
[/if]
</td>
</tr>
[if session logged_in]
<tr>
<td><b>Description<br>(English:)</b></td>
<td>
	<input type=text size=30 name="rdescription" value="[loop-field
rdescription]">
</td>
</tr>
[else]<tr><td>&nbsp</td><td>&nbsp</td></tr>[/else]
[/if]
<tr>
<td><b>Price: $</b></td>
<td>
[if session logged_in]
	<input name=price size=10 value=[loop-price noformat]>
[else]
	[loop-price noformat]
[/else]
[/if]
</td>
</tr>
<tr>
<td>&nbsp</td>
<td align=right>
[order [loop-code]]<b>Order</b>[/order]
</td>
</tr>
<tr><td>&nbsp</td><td>&nbsp</td></tr>
</table>
</center>

[if session logged_in]
<center>
	<input type=submit name=mv_click value="Create">
	<input type=submit name=mv_click value="Save">
	<input type=submit name=mv_click value="Delete">
	</form>
</center>
[/if]

[/tag]

...

Have a nice day,

Alex


Search for: Match: Format: Sort by: