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 Releases
random gift on register
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="DDDDec" data-source="post: 467495" data-attributes="member: 75952"><p>[CODE=php]</p><p>$enable = array(</p><p> "registerGift" => true</p><p>);</p><p></p><p>public function registerGift() {</p><p> global $db, $enable;</p><p> if ($enable['registerGift'] == true) {</p><p> $day = date('l');</p><p> $getGift = $db->prepare('SELECT * FROM cms_register_gift WHERE day = :day');</p><p> $getGift->bindParam(":day", $day);</p><p> $getGift->execute();</p><p> if ($getGift->RowCount() > 0) {</p><p> if ($getGift->RowCount() == 1) {</p><p> $getGift = $gift->fetch();</p><p> $giveGift = $db->prepare("INSERT INTO user_furni (furniture) VALUES (?)");</p><p> $giveGift->execute([$getGift]);</p><p> } else {</p><p> while ($getGift = $gift->fetch()) {</p><p> $giveGift = $db->prepare("INSERT INTO user_furni (furniture) VALUES (?)");</p><p> $giveGift->execute([$getGift]);</p><p> }</p><p> }</p><p> } else {</p><p> exit();</p><p> }</p><p> }</p><p> }[/CODE]</p><p>give a gift to a user when registering or multiple gifts</p></blockquote><p></p>
[QUOTE="DDDDec, post: 467495, member: 75952"] [CODE=php] $enable = array( "registerGift" => true ); public function registerGift() { global $db, $enable; if ($enable['registerGift'] == true) { $day = date('l'); $getGift = $db->prepare('SELECT * FROM cms_register_gift WHERE day = :day'); $getGift->bindParam(":day", $day); $getGift->execute(); if ($getGift->RowCount() > 0) { if ($getGift->RowCount() == 1) { $getGift = $gift->fetch(); $giveGift = $db->prepare("INSERT INTO user_furni (furniture) VALUES (?)"); $giveGift->execute([$getGift]); } else { while ($getGift = $gift->fetch()) { $giveGift = $db->prepare("INSERT INTO user_furni (furniture) VALUES (?)"); $giveGift->execute([$getGift]); } } } else { exit(); } } }[/CODE] give a gift to a user when registering or multiple gifts [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
random gift on register
Top