Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
[PHP] DateTime.Today.toString error. HELP ME
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mirojantti" data-source="post: 250503" data-attributes="member: 40228"><p>Hey nerds <img src="/styles/default/xenforo/smilies/emojione/tongue.png" class="smilie" loading="lazy" alt=":p" title="Stick Out Tongue :p" data-shortname=":p" />! Could someone of you help me a little bit? I'm getting this error:</p><p></p><p><strong>Fatal error</strong>: Call to undefined function toString() in <strong>C:\xampp\htdocs\me.php</strong> on line <strong>45</strong></p><p></p><p>Why doesn't my toString() function work? Here's my code below:</p><p></p><p>[PHP] $id = $user->id;</p><p> $pvm = $user->lastdailycredits;</p><p> </p><p></p><p>//Update the record</p><p> if($pvm != DateTime.Today.toString("MM/dd")) //This is line 45</p><p> {</p><p> $updateQuery = "UPDATE users SET crystals = crystals + 1 WHERE id = $id";</p><p> mysql_query($updateQuery) or die("Error: ".mysql_error());</p><p> }[/PHP]</p><p></p><p>Please someone figure this out so I can make that my hotel users get 1 crystal every day. Thanks guys for reading this<img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="mirojantti, post: 250503, member: 40228"] Hey nerds :p! Could someone of you help me a little bit? I'm getting this error: [B]Fatal error[/B]: Call to undefined function toString() in [B]C:\xampp\htdocs\me.php[/B] on line [B]45[/B] Why doesn't my toString() function work? Here's my code below: [PHP] $id = $user->id; $pvm = $user->lastdailycredits; //Update the record if($pvm != DateTime.Today.toString("MM/dd")) //This is line 45 { $updateQuery = "UPDATE users SET crystals = crystals + 1 WHERE id = $id"; mysql_query($updateQuery) or die("Error: ".mysql_error()); }[/PHP] Please someone figure this out so I can make that my hotel users get 1 crystal every day. Thanks guys for reading this:) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[PHP] DateTime.Today.toString error. HELP ME
Top