Il y a bien cette fonction, mais s'execute tout de suite, existe il l'équivalent en Javascript à mettre dans le clic du bouton
header('Location: index.html');
pour info : voici le code de ma page "a.php":
--------------------------------------------------------------------
<body background="mm_bg_red.gif" bgcolor="#050000" text="#ffffff" link="#000080" vlink="#800080" alink="#ff0000" scroll="no"
ONLOAD="javascript:document.saisie.nom.focus()">
<form name="saisie" action="a.php" method="post">
<table summary="" border="0">
<tr>
<td>Nom : </td>
<td><input type="text" name="nom"></td>
</tr>
<tr>
<td>Score : </td>
<td><input type="text" name="score"></td>
</tr>
<tr>
<td>Niveau : </td>
<td><input type="text" name="niveau"></td>
</tr>
</table>
<input type="submit" value="Envoyer" ONCLICK="return verif_donnee()"><br>
<?php
if (!empty($nom))
{
$serveur=mysql_connect("******", "******", "");
mysql_select_db ("******");
$sql="insert into top (nom, score, niv) values ('$nom', '$score', '$niveau')";
mysql_query ($sql);
$sql="select * from top order by score desc";
$resultat=mysql_query ($sql);
$nb=mysql_num_rows ($resultat);
echo "Enregistrement réussi - nb enregistrement : $nb<br>";
mysql_close($serveur);
}
?>
<input type="reset" value="Retour" onclick=window.open("index.html",target="_self")>
</form>
</body>
</html>
La bêtise a ceci de terrible qu'elle peut ressembler à la plus profonde sagesse.
:-p