par
d0uz3 » 21 sept. 2014, 21:33
arf, j'en ch... dans les Mises a Jour.
déja, bizarrement il me liste bien les joueurs ' a modifier ' ( donc inscrits dans JOUES a l'id_match désiré ) mais il ne me remonte pas les bonnes infos :
Code : Tout sélectionner
$sqlid = "select * from JOUES join players ON players.id = JOUES.id_joueur where id_match='$match'";
$reqid = mysql_query($sqlid);
print "<table align=\"center\" border = '0'>
<tr><th></th><th>Nom</th><th>Dispo</th><th>En Attente</th><th>Indispo</th><th>Annulé</th><th></th></tr>
<form method = 'post' action = 'index.php?page=maj_party' >";
while($res = mysql_fetch_assoc($reqid))
{
$id = $res['id'];
$dispo = $res['Dispo'];
$nom = $res['nom'];
$id_joueur = $res['id_joueur'];
print "<tr><td><input type='hidden' name='ids' readonly='readonly' value='$id_joueur' /></td>
<td>$nom</td>";
echo '<td><input type="radio" name="Dispo['.$id_joueur.']" value="Y"';
if( $dispo == "Y" )
echo ' checked="checked"';
echo '/></td>';
echo '<td><input type="radio" name="Dispo['.$id_joueur.']" value="N"';
if( $dispo == "N" )
echo ' checked="checked"';
echo '/></td>';
echo '<td><input type="radio" name="Dispo['.$id_joueur.']" value="S"';
if( $dispo == "S" )
echo ' checked="checked"';
echo '/></td>';
echo '<td><input type="radio" name="Dispo['.$id_joueur.']" value="A"';
if( $dispo == "A" )
echo ' checked="checked"';
echo '/></td>';
echo '<td><button type = "submit">MAJ</button></td>';
}
print "</form><tr><th></th><th></th><th></th><th></th><th></th><th></th><th></th></tr></tr></table>";
ca me sort une erreur pour 2 joueurs, ils apparaissent ' indispos ' alors qu'ils sont bien notés en S dans phpmyadmin..
et enfin, lorsque je veux faire une MAJ, ca ne change rien dans la table JOUES, pourtant je suis pas loin, j'arrive juste pas a recuperer le A dans le tableau la :
Array ( [ids] => 1 [Dispo] => Array ( [1] => A ) )
voila comment je tente de le récupérer :
Code : Tout sélectionner
$id_joueur = $ids['id_joueur'];
$disp = $Dispo['id_joueur'];
print $disp;
l'ids je l'ai, mais le $disp s'affiche pas

arf, j'en ch... dans les Mises a Jour.
déja, bizarrement il me liste bien les joueurs ' a modifier ' ( donc inscrits dans JOUES a l'id_match désiré ) mais il ne me remonte pas les bonnes infos :
[code]
$sqlid = "select * from JOUES join players ON players.id = JOUES.id_joueur where id_match='$match'";
$reqid = mysql_query($sqlid);
print "<table align=\"center\" border = '0'>
<tr><th></th><th>Nom</th><th>Dispo</th><th>En Attente</th><th>Indispo</th><th>Annulé</th><th></th></tr>
<form method = 'post' action = 'index.php?page=maj_party' >";
while($res = mysql_fetch_assoc($reqid))
{
$id = $res['id'];
$dispo = $res['Dispo'];
$nom = $res['nom'];
$id_joueur = $res['id_joueur'];
print "<tr><td><input type='hidden' name='ids' readonly='readonly' value='$id_joueur' /></td>
<td>$nom</td>";
echo '<td><input type="radio" name="Dispo['.$id_joueur.']" value="Y"';
if( $dispo == "Y" )
echo ' checked="checked"';
echo '/></td>';
echo '<td><input type="radio" name="Dispo['.$id_joueur.']" value="N"';
if( $dispo == "N" )
echo ' checked="checked"';
echo '/></td>';
echo '<td><input type="radio" name="Dispo['.$id_joueur.']" value="S"';
if( $dispo == "S" )
echo ' checked="checked"';
echo '/></td>';
echo '<td><input type="radio" name="Dispo['.$id_joueur.']" value="A"';
if( $dispo == "A" )
echo ' checked="checked"';
echo '/></td>';
echo '<td><button type = "submit">MAJ</button></td>';
}
print "</form><tr><th></th><th></th><th></th><th></th><th></th><th></th><th></th></tr></tr></table>";
[/code]
ca me sort une erreur pour 2 joueurs, ils apparaissent ' indispos ' alors qu'ils sont bien notés en S dans phpmyadmin..
et enfin, lorsque je veux faire une MAJ, ca ne change rien dans la table JOUES, pourtant je suis pas loin, j'arrive juste pas a recuperer le A dans le tableau la :
Array ( [ids] => 1 [Dispo] => Array ( [1] => A ) )
voila comment je tente de le récupérer :
[code] $id_joueur = $ids['id_joueur'];
$disp = $Dispo['id_joueur'];
print $disp;
[/code]
l'ids je l'ai, mais le $disp s'affiche pas :(