Je dois réaliser un calendrier pour des rencontres sportives et tout fonctionnait mais depuis un certain temps cela ne fonctionne plus.
Grace au code ci-dessous je demande à l'utilisateur de renseigner le nombre de journée :
<?php $nb = "" ; ?>
<input name="nb" type="texte" size="2" class="champ" id="nb" value="<?php echo $nb; ?>" <?php if ($nb != "") echo "onfocus=blur();"; ?> />
<?php if ($nb == "") echo " puis appuyer sur <input name='Submit3' type='button' class='bouton' onClick=MM_goToURL('parent','insert_calendrier.php');return document.MM_returnValue value='Ok'>"; ?>
</p>
<p class="parag"> 2ème Etape - Equipe =
<select name="id_equipe" class="champ" id="select5">
<option value="0" selected="selected">Aucun</option>
<?php
$sqldip = 'select abreviation, nom, id_equipe from tb_equipes order by sexe, abreviation';
// $nbsql += 1;
if ($resselectdip = mysql_query($sqldip)) {
while ($selectdip = mysql_fetch_array($resselectdip))
{
if ($id_equipe == $selectdip["id_equipe"])
$temp = " selected";
else
$temp = "";
echo '<option value="'.$selectdip["id_equipe"].'" '.$temp.'>'.$selectdip["abreviation"].'-'.$selectdip["nom"].'</option>';
}
}
?>
</select>
Ensuite en fonction du nombre de journée le tableau s'affiche : <table width="100%" border="0" align="center" cellpadding="2" cellspacing="2" class="parag">
<tr>
<td colspan="2" bgcolor="#990000"><strong>MATCH ALLER</strong></td>
<td rowspan="2" bgcolor="#990000"><strong>Visiteurs* aux</strong><strong><br />
matchs RETOUR</strong></td>
<td rowspan="2" bgcolor="#990000"><strong>Visiteurs* aux<br />
</strong><strong>matchs ALLER</strong></td>
<td colspan="2" bgcolor="#990000"><strong>MATCH RETOUR</strong></td>
</tr>
<tr>
<td bgcolor="#990000"><strong>Date </strong><font size="-5">aaaa-mm-jj</font></td>
<td bgcolor="#990000"><strong>N° Match</strong></td>
<td bgcolor="#990000"><strong>N° Match</strong></td>
<td bgcolor="#990000"><strong>Date<font size="-5"> </font></strong><font size="-5">aaaa-mm-jj</font></td>
</tr>
<?php
mysql_select_db($database_cagnes, $cagnes);
for($i=1;$i<=$nb;$i++){
echo '<tr>';
echo '<td bgcolor="#000099"><input name="date_aller'.$i.'" type="text" class="champ" size="10" maxlength="10"></td>';
echo '<td bgcolor="#000099"><input name="no_match_aller'.$i.'" type="text" class="champ" size="4"></td>';
//print '<td bgcolor="#000099"><input name="visiteur_retour'.$i.'" type="text" class="champ" size="4"></td>';
echo '<td bgcolor="#000099"><select name="visiteur_retour'.$i.'" class="champ">';
$sqldip = 'select id_club, nom from tb_clubs order by id_club';
if ($resselectdip = mysql_query($sqldip)) {
while ($selectdip = mysql_fetch_array($resselectdip))
echo '<option value="'.$selectdip["id_club"].'">'.$selectdip["nom"].'</option>';
}
echo '</select></td>';
echo '<td bgcolor="#000099"><select name="visiteur_aller'.$i.'" class="champ">';
$sqldipe = 'select id_club, nom from tb_clubs order by id_club';
if ($resselectdipe = mysql_query($sqldipe)) {
while ($selectdipe = mysql_fetch_array($resselectdipe))
echo '<option value="'.$selectdipe["id_club"].'">'.$selectdipe["nom"].'</option>';
}
echo '</select></td>';
echo '<td bgcolor="#000099"><input name="no_match_retour'.$i.'" type="text" class="champ" size="4" maxlength="4"></td>';
echo '<td bgcolor="#000099"><input name="date_retour'.$i.'" type="text" class="champ" size="10" maxlength="10"></td>';
echo '</tr>';
}
?>
</table>
<p class="parag">
<input name="Submit" type="submit" class="bouton" value="Ajouter calandar" />
</p>
</form>
Mon probléme c'est que le tableau ne s'affiche pas... et je ne trouve pas pourquoi !Merci pour votre aide...