Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 17th, 2004, 09:34 AM
Authorized User
Join Date: Jul 2004
Location: rajshahi, , Bangladesh.
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajuru Send a message via Yahoo to rajuru
Default Stopping frequent submission

Dear Programmers
I am very new to PHP

I have an registration form. I want to give every user a random and unique registration number . How can I do this.

In submission form I want to stop frequent submission. I mean now if the user submits the form 100 time, it stores hundred time. How I can stop multiple submission from a certain IP for a certain time.

I am using a text file for storing user information and successfully storing and retrieving data

Please help me

Thanking you

Best Regard:
Md. Zakir Hossain (Raju)

www.rajuru.xenexbd.com - my blog with PHP scripts, PHP Book Review and many more
  #2 (permalink)  
Old August 20th, 2004, 09:56 AM
Nos Nos is offline
Registered User
Join Date: Aug 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

First, I would very highly suggest that you use a database like MySQL for storing things.. its much faster than flat text files, and in the future will make life much easier.

As far as registration numbers, there's a few ways to do it... usually I used an auto_increment column in a MySQL DB to do this. You could do something like MD5 the current date/time.

To stop multiple submits, store the users IP address (again, I would use a DB) and set an expiry time (2 minutes or so). Then when they try to do a submit, check for that IP and if the expiry time has passed.

What have you http://www.foundonp2p.com

Similar Threads
Thread Thread Starter Forum Replies Last Post
form submission...help!? mdbrueckner ASP.NET 2.0 Basics 1 September 19th, 2007 06:16 PM
Frequent prompts 4 password mod_ntml.so in apache urmilasingh J2EE 0 August 4th, 2005 10:50 AM
PHP & Forms: stopping spam and multiple posts stephen_c_ Beginning PHP 1 July 28th, 2005 02:36 PM
Duplicate Error Message Stopping it ru1 Access 2 February 25th, 2005 04:53 PM
ASP 0177 Object server is stopping when OLE servic not24 Classic ASP Components 2 August 12th, 2003 02:58 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.