MESSAGE
DATE | 2008-08-10 |
FROM | Ruben Safir
|
SUBJECT | Re: [NYLXS - HANGOUT] Killing a Posted Refresh
|
On Sun, Aug 10, 2008 at 07:00:42PM -0700, Elfen Magix wrote: > Simple Perl hack that I cant wrap my mind around... > > I took an old Perl Polling Script and modified it for a possible web project. > > Problem: After it submits the votes from an HTML page Parsed through a form, it generates the results of the votes. If you refesh the results page after a vote, you increase the results changes as if you voted again. How do I stop that from that happening? >
Sorry - if you mean to prevent revoting? You can add a flag which is reset through the form tags, a flag. If it is zero, accept vote. If it is set to 1, (which it is if $flagg == 0) on the return output, then don't accept the vote.
this is a lot easier with embperl thatn CGI, FWIW.
Ruben
> > > -- http://www.mrbrklyn.com - Interesting Stuff http://www.nylxs.com - Leadership Development in Free Software
So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998
http://fairuse.nylxs.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
"Yeah - I write Free Software...so SUE ME"
"The tremendous problem we face is that we are becoming sharecroppers to our own cultural heritage -- we need the ability to participate in our own society."
"> I'm an engineer. I choose the best tool for the job, politics be damned.< You must be a stupid engineer then, because politcs and technology have been attached at the hip since the 1st dynasty in Ancient Egypt. I guess you missed that one."
© Copyright for the Digital Millennium
|
|