<?php
include ('logue.php'); 
include ('entete2.php');

$page = $_POST["page"];
$idcolo = $_POST["idcolo"];
$planete = $idcolo ;

//echo"<br>$page";

$req3 = "SELECT idjoueur FROM matgraph_users WHERE id='$planete'";
$res3 = db_mysql_Query($req3)or die('erreur sql<br>'.$req3.'<br>'.mysql_error());
$row3 = mysql_fetch_array($res3); 

if($row3[idjoueur] == $idlogin && (ctype_digit($planete))){

	$sql2 = "UPDATE  matgraph_idjoueur SET planete = $idcolo WHERE idjoueur=$idlogin ";
	$res2 = db_mysql_Query($sql2)or die('erreur sql<br>'.$sql2.'<br>'.mysql_error());
	
}

echo '<script language="javascript" type="text/javascript">
<!--
window.location.replace("'.$page.'");
-->
</script>';


?>