Location: PHPKode > projects > Gatito Prediction League > gatito_pred_league/admin/pos_edit.php
<? 
// set initial vars //
$user="admin";
@$home=$HTTP_GET_VARS['home'];
@$away=$HTTP_GET_VARS['away'];
@$game=$HTTP_GET_VARS['game_no'];
@$week=$HTTP_GET_VARS['week_no'];
@$close_date=$HTTP_GET_VARS ['close_date'];
@$funct=$HTT_GET_VARS ['funct'];


include "../templates/connect_db.php";
// update checker and results Dbs //
$close_date = str_replace('__', ' ', $close_date);
echo "updated   week: $week game $game $home v $away $close_date";

mysql_query("UPDATE checker SET home_team = '$home', away_team = '$away', close_date='$close_date' WHERE game='$game' AND week='$week'") or die (mysql_error());
;
mysql_query("UPDATE results SET home_team = '$home', away_team = '$away', close_date='$close_date' WHERE game='$game' AND week='$week'") or die (mysql_error());
;
// display fixtures to be edited //
$query=mysql_query("SELECT * FROM users WHERE username='admin'") or die (mysql_error());
while ($row =@ mysql_fetch_array($query)) { 
	@$week ="$row[week]";};
$query=mysql_query("SELECT * FROM checker where week <'$week' AND result='9' ORDER BY game");
while ($row =@ mysql_fetch_array($query)) {
	$dispdate =$row[close_date]; 
	$dispdate = str_replace(' ', '__', $dispdate);
	@$entered.="<form name='game' method='get' action='index.php'>
	Week: $row[week] <input type = hidden name = week_no value = $row[week]> Game: $row[game] <input type = hidden name = game_no value = $row[game]> <input type = text name = home value =$row[home_team] size=14> v <input type = text name = away value =$row[away_team] size=14>  <input type = text  name = close_date value = $dispdate> <input type=hidden name=page_funct value=pos_edit><input type=submit value=edit></form><br> 
	

	";};
	echo $entered;


Return current item: Gatito Prediction League