Location: PHPKode > projects > Gatito Prediction League > gatito_pred_league/fix_enter.php
<?

@$home=$HTTP_GET_VARS['home'];
@$away=$HTTP_GET_VARS['away'];
@$game_no=$HTTP_GET_VARS['game_no'];
@$week_no=$HTTP_GET_VARS['week_no'];

$user="admin";
@$day=$HTTP_GET_VARS ['day'];
@$month=$HTTP_GET_VARS ['month'];
@$year=$HTTP_GET_VARS ['year'];
@$hours=$HTTP_GET_VARS ['hours'];
@$minutes=$HTTP_GET_VARS ['minutes'];
@$bst=$hours-0;
@$close_date="$year-$month-$day $bst:$minutes:00";
include "connect_db.php";


$query=mysql_query("SELECT * FROM users WHERE username='admin'") or die (mysql_error());
while ($row =@ mysql_fetch_array($query)) { 
	@$week ="$row[week]";};
	echo "Enter fixtures for week:$week";
if ($game_no!="") {$game_no=$game_no+1;} else {$game_no=1;};

include "timemenu.php";
$query=mysql_query("SELECT * FROM teams WHERE comp = 'spl'");
while ($row =@ mysql_fetch_array($query)) { 
	@$teams .="<option value=$row[team]>$row[team]</option>";};

	
Switch (@$game_no) {
case ($game_no>0):		
Echo "<form name='game' method='get' action='index.php'>
game $game_no:
<input type='hidden' name='game_no' value='$game_no'>
<input type='hidden' name='week_no' value='$week_no'>
<input type='hidden' name='page_funct' value='fix_enter'>
  <select name='home'>
    $teams
  </select>
  v 
  <select name='away'>
    $teams
  </select>
  <br/>
  date: <select name='day'>
    $day_menu
  </select>
   <select name='month'>
    $month_menu
  </select>
  <select name='year'>
    $year_menu
  </select> KO time: 
  <select name='hours'>
    $hours_menu
  </select>:
  <select name='minutes'>
    $minutes_menu
  </select>
  <input type='submit' name='Submit' value='Submit'>
  
</form>";
default:
$game_no=$game_no-1;

if ($game_no!=0) {
mysql_query ("INSERT INTO checker Values ('$user','$home','9','$away','9','9','$game_no','$week','$close_date')") or die (mysql_error());
$query=mysql_query("SELECT * FROM checker where week= '$week' ORDER BY game");
while ($row =@ mysql_fetch_array($query)) { 
	@$entered.="Week $row[week], Game $row[game]:  $row[home_team] v $row[away_team]<br>";};
	echo $entered;};
	
	
};

?>

Return current item: Gatito Prediction League