I see other have offered answers to these. Here is my thoughts:

A- What do I add to the code in to make it display an alternate
message every 500th time the form is submitted?

James mentioned using the primary key. I agree. When you store the collected 
information in your
database you should be using an auto_increment column as the primary key. When 
you insert a new
record use mysql_insert_id() to obtain the inserted record's key. Take the key 
an divide by 500
using (%) modulus. If you get zero then the the key is a multiple of 500. Take 
action from there.

B- What do I add to the code so that a email address or person can
only submit it once in a designated time period (24 hours)?

Another easy answer. Make sure you have a column in your database of timestamp. 
This will be
populated when a new record is created/updated. When a user attempts to submit 
another instance of
the form data compare the timestamps from the previous record. Oh and the key 
to this look up is
the person's email address. My advice is don't trust cookies.

My thoughts anyway.
P

--- clay_n_graphics <[EMAIL PROTECTED]> wrote:

> I have created a very basic php form and when someone enters their 
> info, they are taken to a confirmation page that displays what they 
> input and emails a copy to me and enters the information into my 
> database.  
> 
> Here's my problem:
> 
> A- What do I add to the code in to make it display an alternate 
> message every 500th time the form is submitted?
> 
> B- What do I add to the code so that a email address or person can 
> only submit it once in a designated time period (24 hours)?
> 
> It seems like it wouldn't be complicated, but I'm having a brain 
> freeze.
> 
> Thanks for any assistance :)
> 
> 
> 
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12h16ombf/M=362329.6886308.7839368.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1123697836/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to