Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 10-23-2008, 09:34 AM Repeating entries...
Skilled Talker

Posts: 60
Trades: 0
To have a form where people enter their email address and if that email address is already in the database at least five times they are then they're sent an email with a link?

I want people who recommend their friends and when they've recommended five people they get a bonus

Thanks
thehappyappy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-23-2008, 11:49 AM Re: Repeating entries...
stoot98's Avatar
Ultra Talker

Posts: 427
Name: Stuart
Location: Glasgow, Scotland
Trades: 0
Code:
SELECT COUNT(*) AS [Count] FROM myTable WHERE emailAddress='$enteredEmailAddress'

//pull count out

if ($count > 5){

//send email

}
stoot98 is offline
Reply With Quote
View Public Profile
 
Old 10-24-2008, 05:12 AM Re: Repeating entries...
Skilled Talker

Posts: 60
Trades: 0
Brilliant thanks - do I use as is or do I change [count] to anything? Also do I add this to the page that sends the results of the form to the db? One other question, is it possible to change this so that if enterEmailAddress is the same five times it sends the email, but only if myaddress is different every time?
Thanks
thehappyappy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Repeating entries...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30727 seconds with 12 queries