Javascript instruction
Fermé
artcompus
Messages postés
56
Date d'inscription
mercredi 12 octobre 2011
Statut
Membre
Dernière intervention
14 septembre 2013
-
9 déc. 2011 à 21:51
artcompus Messages postés 56 Date d'inscription mercredi 12 octobre 2011 Statut Membre Dernière intervention 14 septembre 2013 - 9 déc. 2011 à 22:25
artcompus Messages postés 56 Date d'inscription mercredi 12 octobre 2011 Statut Membre Dernière intervention 14 septembre 2013 - 9 déc. 2011 à 22:25
A voir également:
- Javascript instruction
- Telecharger javascript - Télécharger - Langages
- Javascript round ✓ - Forum Javascript
- Le fichier contient un programme écrit en python. le programme construit un mot secret mais il ne l'affiche pas. modifiez ce programme afin que à chaque itération de la boucle : la variable a augmente de 2 la variable b diminue de 1 ajoutez une instruction pour faire afficher le mot secret construit. quel est ce mot secret ? ✓ - Forum Python
- L'instruction a 0x0000 ne peut pas être read - Astuces et Solutions
- Table de multiplication javascript ✓ - Forum Javascript
1 réponse
artcompus
Messages postés
56
Date d'inscription
mercredi 12 octobre 2011
Statut
Membre
Dernière intervention
14 septembre 2013
3
9 déc. 2011 à 22:25
9 déc. 2011 à 22:25
Oh, finalement je l'ai trouvé très rapidement en php voilà la solution :
<?php
$mem_asso = array('5','10','15','20','25','30'); ?>
<form name="form1" method="post" action="index.php">
<select name="limit" onchange="document.form1.submit();">
<?php
$titre = isset($_POST['limit']) ? $_POST['limit'] : "";
for($i=0; $i<=5; $i++){
$selected = $titre == html_entity_decode($mem_asso[$i]) ? " selected = \"selected\"" : null;
echo "<option value=\"". $mem_asso[$i] ."\"". $selected .">". $mem_asso[$i] ."</option>\n";
}
?>
</select>
</form>
Merci
<?php
$mem_asso = array('5','10','15','20','25','30'); ?>
<form name="form1" method="post" action="index.php">
<select name="limit" onchange="document.form1.submit();">
<?php
$titre = isset($_POST['limit']) ? $_POST['limit'] : "";
for($i=0; $i<=5; $i++){
$selected = $titre == html_entity_decode($mem_asso[$i]) ? " selected = \"selected\"" : null;
echo "<option value=\"". $mem_asso[$i] ."\"". $selected .">". $mem_asso[$i] ."</option>\n";
}
?>
</select>
</form>
Merci