FAQ/Help
user_login; $firstname = $user_info-> user_firstname; $lastname = $user_info-> user_lastname; //performing check for flagged tile, this is to be sure that the if statement later is comparing aganist a 0 that is because of no flag row. $flag_check_query = mysql_query("SELECT * FROM stepcity.tiles WHERE stepcity.tiles.tile='flag' and stepcity.tiles.user_id=$pid"); $flag_check = mysql_num_rows($flag_check_query); if($flag_check >= 1){ //queries for checking what building is flagged in the groups map, and getting the sum of all the members of the group. $flag_query = mysql_query("SELECT progress, excess_and_bonus, x_coord, y_coord FROM stepcity.tiles WHERE progress > 0 and user_id=$pid"); $check_sum = mysql_query("SELECT SUM(add_to_progress) AS 'CAT' FROM stepcity.members WHERE user_id='$pid'"); $select_max = mysql_query("SELECT MAX(add_to_progress) AS 'MAX' FROM stepcity.members WHERE user_id='$pid'"); //performing said queries $flag_row = mysql_fetch_array($flag_query); $sum = mysql_fetch_array($check_sum); $max = mysql_fetch_array($select_max); //Variables set for convience $progress = $flag_row[0]; $sumx = $sum['CAT']; $combine = ($sumx + $flag_row[1]); $xam = $max['MAX']; $final = ($combine - $progress); ?> 0){ $_SESSION['excess'] = $final; //resetting data to get ready for next building $change_building = mysql_query("UPDATE stepcity.tiles SET tile='$price_array[0]', progress='0', excess_and_bonus='0' WHERE tile='flag' AND user_id='$pid'") or die(mysql_error()); $reset_progress = mysql_query("UPDATE stepcity.members SET add_to_progress='0' WHERE user_id='$user_id'"); } //else {echo "No Dice";} //} //echo $progress . $sumx . $combine . $xam . $final; } else { $_SESSION['excess'] =0; } ?> '; $result = mysql_query("SELECT x_coord, y_coord, tile FROM stepcity.tiles WHERE user_id=$pid"); //$row = mysql_fetch_row($result); /**************************** **This logic isn't right!** *****************************/ $tileArray = Array(); $index = 0; while($row = mysql_fetch_row($result)) // loop to give you the data in an associative array so you can use it however. { ?> Under Construction'; } else { $building .= $tileArray[$index] .'.jpg" alt="'. $tileArray[$index] .'">'; } $building .= ''; echo "\n"; $index++; } echo ''; } } if($stat_get['age'] == 'Renaissance'){ for ($i = 0; $i < 5; $i++) { //show grid for ($j = 0; $j < 5; $j++) { $tile = array($row[0], $row[1], $row[2]); $building = 'Medieval '. $tileArray[$index]  .''; echo ""; } echo ''; } } ?>
"."
"; ?>
"."
"; } ?>

You have taken steps since you started to play this game.

Your kingdom has:
Gold
0

Crime
0

Population
0

"; if ($stat_get['age'] == 'classical_age'){ $next_age = 'Renaissance'; $pop_needed = 5; $gold_needed = 70000; $gold_left = ($stat_get['gold'] - $gold_needed); $_SESSION['gold'] = $gold_left; $_SESSION['current'] = $stat_get['age']; echo "You require ".$gold_left ." more gold to proceed to the ".$next_age."."."
"."
"; } if ($stat_get['age'] == 'Renaissance'){ $next_age = 'modern'; $pop_needed = 8; $gold_needed = 90000; $gold_left = ($stat_get['gold'] - $gold_needed); $_SESSION['gold'] = $gold_left; $_SESSION['current'] = $stat_get['age']; echo "Your group requires ".$gold_left." more gold to proceed to the ".$next_age." age."."
"."
"; } if ($stat_get['age'] == 'modern'){ $next_age = 'Space age'; $pop_needed = 11; $gold_needed = 110000; $gold_left = ($stat_get['gold'] - $gold_needed); $_SESSION['gold'] = $gold_left; $_SESSION['current'] = $stat_get['age']; echo "Your group requires ".$gold_left." more gold to proceed to the ".$next_age."."."
"."
"; } ?>
= $gold_needed AND $stat_get['population'] == $pop_needed){ echo "If you would like to advance to the next age at this time click the button below:"."
"; //echo 'Yes take us to the next age!'; echo ''; } } ?>
$building
$building