Bang away

 
Gadgets

Authentication
Crypto
ENV
HTTP
Regex
Regex 2
Robots
Snarfs
SSL
Stepper

Now, tail the data file: tail -f /usr/temp/data and watch what happens when you click the submit button. You should see the data added on each submit.

Fri Nov 12 19:22:40 1999Johncrypto4
Fri Nov 12 19:22:52 1999Johncrypto4
Fri Nov 12 19:23:03 1999Johncrypto4
Fri Nov 12 19:25:27 1999Johncrypto4

If you're not seeing this, be sure your Web server has the authority to write to /usr/temp/data. If need be, give /usr/temp and /usr/temp/data a mode of 777.

Change the field values in the HTML form to something different so you'll recognize them, and add a pause to the Perl script, say, 7 seconds: sleep(7);. Add the sleep statement somewhere between where the script grabs the data and where it writes it to the file.

When you run the form now, you'll see a little hourglass or wristwatch or whatever your OS uses to tell you to park it for a minute. But forget that. You're in a hurry. Hammer on the submit button a couple or few times.

Finally, you'll get the Thanks! screen. Meanwhile, your data file starts to grow.

Fri Nov 12 19:22:40 1999Johncrypto4
Fri Nov 12 19:22:52 1999Johncrypto4
Fri Nov 12 19:23:03 1999Johncrypto4
Fri Nov 12 19:25:27 1999Johncrypto4
Fri Nov 12 19:48:10 1999Bubbafoozball999
Fri Nov 12 19:48:12 1999Bubbafoozball999
Fri Nov 12 19:48:13 1999Bubbafoozball999
Fri Nov 12 19:48:14 1999Bubbafoozball999
Fri Nov 12 19:48:16 1999Bubbafoozball999

Note, however, that the time on your Thanks! screen matches only the last set of data. The user is left with the impression that all that hammering on the submit button finally pushed the data through, but only one set.

OK. We've clarified the problem. What do we do about it?

<< Back  Next >>






Home | Gadgets | Code | Links | Reads | Contact

Copyright © 1999, 2001, 2002 by John H. Byrd
All rights reserved.