Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 132,650 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,167 people online right now. Registration is fast and FREE... Join Now!




one a day

 
Reply to this topicStart new topic

one a day

SoLi
post 6 Dec, 2002 - 03:08 PM
Post #1


andrewDust.com

*****
Joined: 27 Jan, 2002
Posts: 1,234


My Contributions


need some help.on this ocean project im working on ( preview )
i want it so the user can only submit one story a day.

now i thought maybe i could just do something with a cookie, like if the submit cookie is present then it means that they have submitted that day and so they cant submit again, but then i realised they could just delete the cookie.

basically i dont want some idiot flooding me. i thought abuot maybe having a field on the users record that has a date in. once the user submits a story the current date is entered into that field, and then each time the user tries to submit another story, it checks to see if todays date is the same as the one on their record, and if it is, the story would not be submitted, where as if the date were different, it'd be submitted, and the field would be once again updated. would this be the best way to do it?

(sorry im a n00b at this stuff).
User is offlineProfile CardPM

Go to the top of the page

klewlis
post 6 Dec, 2002 - 05:29 PM
Post #2


cur tu me vexas?

*****
Joined: 9 Nov, 2001
Posts: 1,723

yep a field in the db would be the best way.
User is offlineProfile CardPM

Go to the top of the page

fyrestorm
post 6 Dec, 2002 - 05:33 PM
Post #3


D.I.C Lover

Group Icon
Joined: 4 Apr, 2002
Posts: 3,103



Thanked 2 times

Dream Kudos: 228
My Contributions


sounds like you worked your way through the problem

db would be best especially if your alternative is cookies, because anyone can delete cookies
User is offlineProfile CardPM

Go to the top of the page

SoLi
post 7 Dec, 2002 - 04:21 AM
Post #4


andrewDust.com

*****
Joined: 27 Jan, 2002
Posts: 1,234


My Contributions


okay thank you smile.gif
User is offlineProfile CardPM

Go to the top of the page

fyrestorm
post 7 Dec, 2002 - 07:42 AM
Post #5


D.I.C Lover

Group Icon
Joined: 4 Apr, 2002
Posts: 3,103



Thanked 2 times

Dream Kudos: 228
My Contributions


anytime man wink2.gif
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 05:15AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month