Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9251949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:49:35+00:00 2026-06-18T10:49:35+00:00

Hey iam making a slot machine and is almost done. The only thing i

  • 0

Hey iam making a slot machine and is almost done. The only thing i need is the credit’s to stay so it just add points on the credit’s. Like if i have 100 credits and then get 25 credits i want it to say 125 credits. Now i don’t know how to get the credits from the round before.
This is what i got:

            <?
    $tal = rand (1,3 ); {
    echo "<img src='css/billeder/enarmet$tal.gif' class=billed />"; 
    $tal2 = rand (1,3 ); 
    echo "<img src='css/billeder/enarmet$tal2.gif' class=billed />"; 
    $tal3 = rand (1,3 ); 
    echo "<img src='css/billeder/enarmet$tal3.gif' class=billed />"; }
    ?>
            </div>
            <div id="credits">
                <h3 id="credits2">CREDITS</h3>
                <h3 id="credits3"><?php 
                $credits=$_GET['credits'];
        if ($tal . $tal2 . $tal3 == 111){
            ($credits=($credits+100));              
        }
        if ($tal . $tal2 . $tal3 == 222){
            ($credits=($credits+50));                
        }
        if ($tal . $tal2 . $tal3 == 333){
            ($credits=($credits+25));               
        }
        echo $credits;
        ?></h3>
            </div>
        </div>
        <form action="index.php" method="POST">
            <input type="submit" value="SPIN" class="knap">
        </form> 
        <form action="cashout.php" method="POST">
            <input type="submit" value="CASH OUT" class="knap">
        </form>
    </div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:49:37+00:00Added an answer on June 18, 2026 at 10:49 am

    What about using sessions? Store and retrieve credits from session storage using

    session_start();
    $credits = $_SESSION['credits'];
    

    at the top of your script and

    $_SESSION['credits'] = $credits;
    

    at the bottom.

    This way credits will be preserved between page-loads.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys Iam trying 2 use light box at the moment and every thing
Hey i am making a simple search machine through alot of different coloumns in
Hey, I am making a imageloading system with my tablecells and I need each
Hey guys I am making a Widget to display a posts title, and excerpt
Hey, I am making a custom table cell right now but my custom cell
Hey so i'm making a simple text game using the pdCurses library and a
Hey I am making a personal website to start displaying my work but have
Hey guy's i'm making a website which involves submiting an ad for a gameserver.
Hey I am a newbie at python and I need some help. I've written
Hey so i have a sprite class, and i am making it turn 360

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.