I have tried this in main():
if page.isPostback() then
updated = db.update("RegForm", array("ContactPhone", "
225-888-6666"),
738)
'str.writef("Updated {0} records", updated)
else
... do other stuff
end if
I am passing in static values to keep it simple. The page posts back,
all data fields are cleared, but the data field in the table remains
unchanged. Also, the str.write gives me an error about 'not using
parentheses in sub ', so I had to comment it out.
I'd like to redirect to a success page.; but first it has to update
the record
On Jun 24, 11:50 am, Michal Gabrukiewicz <
mga...@gmail.com> wrote:
> create a normal form with a submit button and put the following code in your
> main()
>
> sub main()
> if page.isPostback() then
> yourvalue = page.QS("yourFormFieldName")
> db.update("tablename", array("dbColumnName", yourvalue),
> "yourIDYouWantToUpdate"
> end if
> end sub
>