|
Posted by joeblow on 01/15/06 13:15
"J2be" <info@nospamj2be.com> wrote in message
news:43c9d5ca$0$1075$4fafbaef@reader2.news.tin.it...
>
> "joeblow" <momo_roadracer@yahoo.com> wrote in message
> news:11sipq1ncri196@corp.supernews.com...
> > Hello,
> >
> > I'm having the hardest time clearing the values in the $_POST[]
variables
> > so
> > that if the page is refreshed, it does not re-enter the same values into
> > MySQL.
> >
> > I've tried "unset($_POST[])" -- now might be a good time to reveal my
> > newbie
> > status.
> >
> > Does PHP recognize a page refresh? Or will I have to check against
> > duplicate
> > entries?
> >
> > Thanks for any advice, it's appreciated.
> >
> > I'll be back Tuesday. All the best...
> >
> > jb
> >
> >
>
> You can save data within the database where you can check if the form have
> been submitted and
> it will not be resubmitted
Herein lies my problem. Not only do I not know how to check if a form has
been submitted (without searching for the information in the database, which
doesn't seem efficient), but I've been unsuccessful in stopping the
submittal. I've attempted to use javascript for submitting the form (or not)
with: "formname.submit()" but that hasn't worked for me. Every time the page
is refreshed, the information is posted and hence, submitted.
> A table with a name like "banlist" will be always good for alot of uses
and
> not only the check for submitted forms
> for security image code checks, ip/hosts bans, bans on bad words or bad
> actions (if someone tries sql injections, XSS, file inclusions etc).
>
> Another solution could be to not resubmit a form if a cookie is set. A
> problem could arise when the browser doesn't support cookies or they are
> disabled.
>
> I hope that those things could help you.
>
>
>
> --
> ----
> Leonardo Armando Iarrusso - J2Be
> www: http://www.J2be.com - e-mail: info[at]J2Be.com
>
>
Navigation:
[Reply to this message]
|