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
SQL query
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="StanleyDev" data-source="post: 71025" data-attributes="member: 9151"><p>Im making a lotto system, and I have made most of the code but I just cant figure out how to send the SQL query into the DB to record the number that user choose/and to remove the appropriate number of lotto points(made a currency as well).</p><p> </p><p>The query codes are: </p><p>[PHP]<?php</p><p> $db = mysql_query ("INSERT INTO `lottery` (`id`, `username`, `num`) VALUES ('$uid','$id','$finalnum');"); </p><p> $db2 = mysql_query ("UPDATE `users` SET `lotto_points`='0' WHERE (`id`='$uid');"); // Remove 24 lotto point from the user, poor thing.</p><p> ?>[/PHP]</p><p>I want it to send when the user clicks on a button</p><p> </p><p>Could someone please write a code for a button so it could execute these query's when it is clicked.</p></blockquote><p></p>
[QUOTE="StanleyDev, post: 71025, member: 9151"] Im making a lotto system, and I have made most of the code but I just cant figure out how to send the SQL query into the DB to record the number that user choose/and to remove the appropriate number of lotto points(made a currency as well). The query codes are: [PHP]<?php $db = mysql_query ("INSERT INTO `lottery` (`id`, `username`, `num`) VALUES ('$uid','$id','$finalnum');"); $db2 = mysql_query ("UPDATE `users` SET `lotto_points`='0' WHERE (`id`='$uid');"); // Remove 24 lotto point from the user, poor thing. ?>[/PHP] I want it to send when the user clicks on a button Could someone please write a code for a button so it could execute these query's when it is clicked. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
SQL query
Top