Se connecter avec
S'enregistrer | Connectez-vous

javascript dans php

Dernière réponse : dans Programmation

Accrochez-vous !!!
.............
while ($rangee = mysql_fetch_array($result1))
{ echo
" <table width='80%' border='2' cellspacing='0' cellpadding='5'>
<tr>
<td width='20%'><div align='center'><font face='Verdana' size='3' >$rangee[pseudo2]</font></div></td>
<td width='20%'><div align='center'><font face='Verdana' size='3' >$rangee[score2]</font></div></td>
<td width='20%'><div align='center'><font face='Verdana' size='3' >$rangee[score1]</font></div></td>
<td width='20%'><div align='center'><font face='Verdana' size='3' >GO</font></div></td>
</tr>
</table>";
.............

Donc si vous avez suivie:
. C'est un fichier php
. On se connecter à une BD
. On affiche les données dans un tableau
Jusque la ça va!
Maintenant à la place d'afficher GO, je veux un bouton GO qui va executer un autre fichier php qui fera ce qu'il a faire.

Merci de vore aide, parce que là c'est trop pour moi,
Salomon



Autres pages sur : javascript php

Lassé par la pub ? Créez un compte

Il n'y a aucun Javascript la dedans ! Un simple formulaire suffit !
De plus je sortirais la balise <table> et </table> de la boucle while car sinon tu va avoir tout plein de tableaux indépendants.
  1. ..........
  2. echo "<table width='80%' border='2' cellspacing='0' cellpadding='5'>";
  3. while ($rangee = mysql_fetch_array($result1))
  4. {
  5. echo "<tr>
  6. <td width='20%'><div align='center'><font face='Verdana' size='3' >$rangee[pseudo2]</font></div></td>
  7. <td width='20%'><div align='center'><font face='Verdana' size='3' >$rangee[score2]</font></div></td>
  8. <td width='20%'><div align='center'><font face='Verdana' size='3' >$rangee[score1]</font></div></td>
  9. <td width='20%'><div align='center'><font face='Verdana' size='3' >
  10. <form method='post' action='ton_autre_fichier.php'><input type='submit' name='go' value='GO'></form>
  11. </font></div></td>
  12. </tr>";
  13. }
  14. echo "</table>";
Lassé par la pub ? Créez un compte