+ Reply to Thread
Results 1 to 3 of 3

Thread: MMaking a button that adds coins.

  1. #1
    hacktheplanet is offline x10Hosting Member hacktheplanet is an unknown quantity at this point
    Join Date
    Aug 2008
    Posts
    12

    MMaking a button that adds coins.

    Ok first open your php welcome file. find were you want to put the link.
    add this were you want the link filling in the game address
    <a href='www.yougameaddress'/coins.php>Get extra Coins</a>
    You can name the file anything just rename the coins part.
    You can also change text be changing Get extra Coins.

    Now to make the coins.php

    Make a new file called what ever you have in the link with the .php at the end
    in side it add this.

    Code:
    <?php
    print "<h3>You got 100 Free Rings</h3>";
    if($db->query('users ringincrease=1'))
    {
    { die("<h1>You have already Collected your 100 coins.</h1>"); }
    }
    $db->query("UPDATE users SET rings=rings+100, ringincrease=ringincrease+1 WHERE userid=$userid");
    print "<a href='home.php'>Home</a>";
    $h->endpage();
    ?>
    Last edited by hacktheplanet; 08-07-2008 at 11:01 PM.

  2. #2
    Conmiro is offline x10 Sophmore Conmiro is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    140

    Re: MMaking a button that adds coins.

    Username: conmiro
    You got 100 Free Rings

    Fatal error: Call to a member function query() on a non-object in /home/conmiro/public_html/rpg/welcome.php on line 10
    Edit:
    Thanks, it works prettywell i think otherwise, excep when i refrehs it keeps giving me 100 rings.
    Last edited by Conmiro; 08-07-2008 at 11:05 PM. Reason: Automerged Doublepost

  3. #3
    hacktheplanet is offline x10Hosting Member hacktheplanet is an unknown quantity at this point
    Join Date
    Aug 2008
    Posts
    12

    Re: MMaking a button that adds coins.

    ya the error means it didn't fins the database. i'm going to fix that
    Edit:
    oh and if you can post your entire welcome.php so i know exactly what it looks like and so i can fix the code for that file
    Last edited by hacktheplanet; 08-07-2008 at 11:14 PM. Reason: Automerged Doublepost

+ Reply to Thread

Similar Threads

  1. Help with PayPal button code...
    By componentwarehouse in forum Programming Help
    Replies: 3
    Last Post: 06-17-2008, 06:22 AM
  2. Flash button for 50 Credits:
    By satheesh in forum The Marketplace
    Replies: 4
    Last Post: 01-25-2008, 08:43 AM
  3. Firefox 'Back' Button Problems
    By GG-Xtreme in forum Off Topic
    Replies: 3
    Last Post: 12-14-2007, 10:55 PM
  4. Adds on advanced
    By mitamata in forum Free Hosting
    Replies: 2
    Last Post: 10-07-2007, 10:49 AM
  5. CGI adds?
    By FeestBijtje in forum Free Hosting
    Replies: 0
    Last Post: 09-19-2005, 02:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers