sourie

J'ai un probleme avec mon foreach il fonctionne avec un radio boutton . Jexplique quand le client inscrit et selection son forfait quil choisi tous est correct quand il revient voir son profil le radio boutton est bien selectionner selon le choix quil avait faite . Mes apres modification quand il revient pour voir ses renseignement mon foreach recupere les variables mais selectionne pas le radio boutton et je ne comprend pas pourquoi
voici mon code et mes variable recuper bien
<?php
function print_forfait($type,$forfait,$getColocation_Qte_U)
{
$query = "SELECT * FROM Forfaits WHERE type='$type'";
$result = mysql_query ($query)
or die ("Erreur interne(3)<BR>");
while ($row = mysql_fetch_array ($result))
{
$nom_forfait = $row["forfait"];
$nom = $row["nom"];
$href = $row["href"];
$forfaits_list[$nom_forfait]["nom"] = $nom;
$forfaits_list[$nom_forfait]["href"] = $href;
}
foreach ($forfaits_list as $key => $element)
{
echo "<tr><td>";
echo "<a href=" . $element["href"] . ">" . $element["nom"] . "</a>";
echo "</td><td>";
echo "<input id=forfait type=radio name=\"forfait\" ";
if ( $forfait == $key )
{
echo "checked ";
}
echo "VALUE=\"$key\">";
if ( $key == "U" )
{
include("combien_de_u.inc");
}
else
{
echo "<td> </td>";
}
echo "</td></tr>";
}
}
?>