View Single Post
  #1  
Old 01-05-2012, 05:46 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 123,020
Tequila is on a distinguished road
Default Code Help for Events

I'm coding a few events (one is a continuous puzzle collecting event that updates once a month with a new puzzle) and want to have it set up so that once a user "finds" a piece it shows up on a new page (tentatively titled 'puzzle', it would show up as 'puzzle.php?user=$username') that's linked from their profile.

Once a puzzle is completed they should get an message from the system that congratulates them, and hands out a promo code for a limited edition adoptable (only two available per user).

Before I can get it ready I'll need to create the puzzle page that's linked, and a way to see what pieces users have in MySQL to check against my puzzle file (which you can see below).

How would I go about doing this? I'm a little lost on what I need to code.

(PS: My puzzle file which lists all parts of the puzzles)
PHP Code:
// **********************************************************************************
// Welcome to the puzzle piece randomizer
// This file will generate 15 pieces of puzzles based on the event and season names
// Pieces can be traded in our forums to complete puzzles at any time
// So far our pieces are
// world, dusk, dawn, eclipse, seasons (spring, summer, fall, winter)
// Let's get this finished up then
// **********************************************************************************

<?php

    $digits 
= array {
        
"01.png",
        
"02.png",
        
"03.png",
        
"04.png",
        
"05.png",
        
"06.png",
        
"07.png",
        
"08.png",
        
"09.png",
        
"10.png",
        
"11.png",
        
"12.png",
        
"13.png",
        
"14.png",
        
"15.png",
    }

    
$event = array {
        
"world",
        
"dusk",
        
"dawn",
        
"eclipse",
    }

    
$season = array {
        
"spring",
        
"summer",
        
"fall",
        
"winter",
    }

?>
__________________
Artist. Designer. Gamer. Mother.
[portfolio] [tarot] [Rune Hollow] [freebies]
Reply With Quote