Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

when refreshing, i resubmit to databse, how can i stop that?

0 views
Skip to first unread message

Jim S.

unread,
Jul 22, 2003, 12:27:20 AM7/22/03
to
hi,
I have a form that collects data and picture file, and when done submit it,
via an action POST.
everything goes alright, but if i press the "refresh" button, in The browser
(while there is nothing in the fields) the last "submitted" data is
resubmitted. is there a way i can stop that from happening?
please help guys
thanks
Jim


DjDrakk

unread,
Jul 22, 2003, 5:23:47 PM7/22/03
to
Could you please explain HOW you are submitting (post, get, etc) and
possibly post part of the source code so we have something to work with?

--
Your GP or your HP!
"Jim S." <j...@hotmail.com> wrote in message
news:I23Ta.113944$Io.97...@newsread2.prod.itd.earthlink.net...

Jim S.

unread,
Jul 22, 2003, 11:09:01 PM7/22/03
to
Well in the previous post i said in BIG capital letters, POST action, i
guess you did not read it right.

"DjDrakk" <DjD...@drakkradio.servemp3.com> wrote in message
news:vhrbnpb...@corp.supernews.com...

DjDrakk

unread,
Jul 23, 2003, 1:32:32 PM7/23/03
to
In that case then, I would suggest doublechecking against your submitted
variables to make sure there are no duplicates. Other than that, I can't
think of any other way offhand.

--
Your GP or your HP!
"Jim S." <j...@hotmail.com> wrote in message

news:h%mTa.115731$Io.98...@newsread2.prod.itd.earthlink.net...

Jim S.

unread,
Jul 23, 2003, 4:36:55 PM7/23/03
to
there are no duplicates, that is forsure.
it seems that the content of the variables (from the fields) are not
resetting after a submit. I tried to UNSET those variables after a submit is
succeful but no luck in solviong the problem.
BUT, the problem is solved if i press the GO button on the browser, instead
the "refresh" then the records fields are reset and will not be resubmitted.

anybody there that may have an idea?

thanks
Jim


"DjDrakk" <DjD...@drakkradio.servemp3.com> wrote in message

news:vhtk1ai...@corp.supernews.com...

Martijn Engler (a.k.a. Blizt)

unread,
Jul 24, 2003, 5:38:43 AM7/24/03
to
There isn't any error in your php-script, it's just the way browsers
handle POST-data. Browsers like MSIE and Mozilla Firebird will tell you
that post-data is resubmitted when you refresh and I don't think there's
anything you can do about it... you can't refresh THAT page without
sending the vars a second time.

- Blizt

PhilM

unread,
Jul 24, 2003, 12:00:35 PM7/24/03
to

"Jim S." <j...@hotmail.com> wrote in message
news:I23Ta.113944$Io.97...@newsread2.prod.itd.earthlink.net...
Don't know whether this would work but...

wrap your POST processing in a test that queries the db for a unique
submitted value (eg date+name+whatever) that would have been entered in
form. If the test fails, process the POST data.

Or

I recall someone else with a similar prob, and it was suggested to prcess
the data on a different script page, and once done, redirect using headers

form.php==>POST==>process.php==[header redirect]==>form.php

As I said, don't know if these will work

regards,
PhilM


Jim S.

unread,
Jul 24, 2003, 1:49:20 PM7/24/03
to
i like your suggestion , i think i may give it a try.
thanks
Jim

"PhilM" <ph...@nospam.com> wrote in message
news:3f200409$0$31925$afc3...@news.optusnet.com.au...

0 new messages