Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

PHP guessing Game

Posted on 2008-06-16
1
Medium Priority
?
414 Views
Last Modified: 2012-05-05
I am looking for a php "guest who the photo is" script which would have so many guess and then it would gave the answer wrong or right and how many guess it took to answer the question.

I guess I could write one, but I wouldn't even know were to start. I am just learning php, it would be nice if I could fins a script that is all ready made to see how it was created.
0
Comment
Question by:starview
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
nitinsawhney earned 2000 total points
ID: 21801351
Hi,

Here is one script that is very much similar to what you are looking for.

http://webscripts.softpedia.com/script/Ad-Management/Guess-Stars-Script-42483.html

But creating one should not be difficult either.

Just a brief discussion about the approach.

First of all lets create the databases:
Let's assume that we'll only allow registered users to take a guess then we should have a Users table.
1. Users
   userid PK
   Name
   email  etc.

Now we need tables for storing the photos and their guesses.

2. Photos
   photoid PK
   photoPath
   Identity(Answer)
   etc.. like date created etc.

3. Guesses
    photoid
    guess

These are basic tables that are required, Now you might want to record what users guessed so we can track that as well..

4. UserGuesses
    userid
    photoid
    isAnsweredCorrectly(yes/no)
    numberOfGuesses to answer.
  etc.

You might need some more tables depending upon the requirement.

Now we are ready with the tables, lets proceed with the admin section.
In admin section we would be needing scripts to manage registered users as well as the photos. So create the script to Add/edit/delete users and script to add/edit/delete the pictures. Also create scripts to add/edit/delete the guesses.

After this move to the front end. You would be needing following forms:
Login
MyPage -> shows user statistics
Play the Game -> Show any picture to the user for which he has not answered and show the guess, accept the answer and accordingly populate the tables.

You know what you need from the front end so go and code mate.

Hope this gives you enough to start with.
Happy learning
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question