J'essaie de ma lançer dans PHP/MYSQL, et , malgré toute ma bonne volonté, j' ai beaucoup de mal à synthétiser mes experiences en la matière ces derniers temps (j' ai pas l' temps !!).
Je tente de mettre en application un cas systématique de base me permettant d' afficher par l' intermédiaire d'un fichier PHP/MYSQL les données saisies dans un formulaire HTML.
Malheureusement, il n' y a rien à faire.
Peut -être devrais-je me tourner vers autre chose, comme le tennis de table ou la boule lyonnaise ...
Merci d' avance pour votre coopération et votre solidarité !(ci-joint extrait code)
<html>
<body>
<?php
//Avec exBaffrallye, tentative d'interaction affrallye.html et Baffrallye; on choisit un rallye
// grâce à des boutons radio pour obtenir les renseignements avec exBaffrallye
$hote="localhost";
$utilisateur="root";
$modpasse="xxxxxxxx";
$database="yyyyyy";
$connexion=mysql_connect($hote,$utilisateur,$modpasse)
or die ("connexion au serveur impossible");
$db=mysql_select_db($database,$connexion)
or die ("selection de la base impossible");
$Nom="$_post[Rallye]";
$rq="SELECT*FROM resultrallye WHERE Nom";
$result=mysql_query($rq)
or die("execution de la requête impossible");
$nblignes=mysql_num_rows($result);
echo "<h1>$Nom<h1>";
echo "<table cellspacing='2'>";
echo "<tr><td colspan='6'><hr></td></tr>";
for ($i=0;$i<$nblignes;$i++) {
$n=$i+1;
$ligne=mysql_fetch_array($result);
while ($ligne=mysql_fetch_array($result))
extract($ligne);
echo "<tr>\n
<td>$n</td>\n
<td>$Epoque</td>\n
<td>$Revêtement</td>\n
<td>$Moyenne</td>\n
<td>$dernier_vainqueur</td>\n
<td>$dernier_deuxième</td>\n
</tr>\n";
echo"</tr></td colspan='6'><hr></td></tr>\n";
}
echo"</table>\n";
/*echo "<table border='2'cellspacing='0'>";
echo "<tr><td width=150px align=center><h3>Nom</h3></td><td width=85px align=center><h3>Epoque</h3></td>
<td width=120px align=center><h3>Revêtement</h3></td><td width=80px align=center><h3>Moyenne</h3></td>
<td width=100px align=center><h3>Dernier Vainqueur</h3></td><td width=100px align=center><h3>Dernier deuxième</h3></td></tr>";
echo "<tr><td colspan='7'><hr></td></tr>";
/*While($ligne=mysql_fetch_array($result))
{extract($ligne);
echo "<tr>\n
<td width=150px align=center><h3>$Nom</h3></td>\n
<td width=85px align=center>$Epoque</td>\n
<td width=120px align=center>$Revêtement</td>\n
<td width=80px align=center>$Moyenne km/h</td>\n
<td width=100px align=center>$dernier_vainqueur</td>\n
<td width=100px align=center>$dernier_deuxième</td>\n
</tr>\n";
echo "<tr><td colspan='7'><hr></td></tr>\n";
}
echo "</table>\n";*/
?>
</body>
</html>