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 8973721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:30:49+00:00 2026-06-15T18:30:49+00:00

I have a hangman game where the user can choose one player or two

  • 0

I have a hangman game where the user can choose one player or two player.

The way it is designed, the game is all on one page and uses post and get variable if statements to display the correct information. Upon first arriving to the page the user has the option of clicking a button which submits via GET either one player or two player.

Then depending on that, and a if($_GET['numplayers']==1) type of statement the appropriate content is loaded.

My issue is that for two players, I also have a form submission for one player to choose a word, so it has to be post (so the other player couldn’t see it in the url). And then there’s the fact that on this second submission I lose the numplayers get variable.

Is there a way I can keep the $_GET['numplayers'] variable without having to use session variables? I don’t want it to stick around that long, my fear being if they move to another page and then back to hangman, but want to play with a different number of players then it will not work.

  • 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-15T18:30:50+00:00Added an answer on June 15, 2026 at 6:30 pm
    • Use AJAX and avoid form submission and reloading of the page.
    • keep the data in the database per game.
    • for every game, its players info and state should be in the database. (use a NoSQL preferably)
    • when some one arrrives at a game page’s unique URL (assign a game id which u will pass in querystring or have clean urls)
    • on that page check which player has arrived, if that player is part of he game, let him play.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a basic hangman game on Netbeans, and the way it works
I have to make a hangman game for a school project and one of
I wanted to find a way to make a hangman game, but that can
have 2 questions : A computer with 32-bit address uses 2-level page table (9
Perverse Hangman is a game played much like regular Hangman with one important difference:
I have made a hangman game in Python, and stupidly didn't save as before
I'm currently busy coding a hangman game in VB.NET. As a wordlist, I have
Have one Doubt In MVC Architecture we can able to pass data from Controller
So for a class we are having to make a hangman game that can
I'm porting a Hangman game to Android and have met a few problems. The

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.