Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-05-2010, 02:24 AM
Quillink Quillink is offline
Member
 
Join Date: Dec 2008
Posts: 93
Credits: 16,638
Quillink
Default RE: Limit clicks/day to 10, for each pet?

Code:
if 	 	($clickdate != date('Y-m-d'))				{ $newdate = date('Y-m-d'); $newctd= $ctd + 1; $addclicks = 1; } 
if	 	 ($clickdate = date('Y-m-d') && $ctd > 9 )	{ $newdate = $clickdate; $newctd = $ctd + 0; }
else if 	($clickdate = date('Y-m-d') && $ctd < 10)	{ $newdate = $clickdate; $newctd = $ctd + 1; $addclicks = 1; }


$query = "UPDATE ".$prefix."owned_adoptables SET ctd='".$newctd."' WHERE aid='".$id."'";
mysql_query($query);
$query = "UPDATE ".$prefix."owned_adoptables SET clickdate='".$newdate."' WHERE aid='".$id."'";
mysql_query($query);

$newclicks = $totalclicks + $addclicks;
This is the code I've flung together based on what I thought would work. Does anyone who actually know php see what's wrong with it..?
$newctd (which stands for "clicks today") is working fine, but for some reason $newdate keeps returning "1". Thanks, if anyone can help me. :)
Reply With Quote
 


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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Freeze ONLY the evolution, not the clicks dulop Questions and Supports 2 09-28-2012 10:29 AM
Limit amount of clicks per day SilverDragonTears Questions and Supports 15 11-29-2011 11:50 AM
Limit clicks/day to 10 sensacion Questions and Supports 1 07-02-2011 05:15 AM
Days Instead of Clicks alonaria Suggestions and Feature Requests 7 06-25-2011 05:27 AM
No Clicks at all? rosepose Questions and Supports 11 03-07-2009 08:42 AM


All times are GMT -5. The time now is 11:29 PM.

Currently Active Users: 1711 (0 members and 1711 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636