Selection dans un combo
Fermé
del-ab91
Messages postés
11
Date d'inscription
mardi 14 avril 2009
Statut
Membre
Dernière intervention
29 avril 2009
-
28 avril 2009 à 13:11
del-ab91 Messages postés 11 Date d'inscription mardi 14 avril 2009 Statut Membre Dernière intervention 29 avril 2009 - 29 avril 2009 à 12:29
del-ab91 Messages postés 11 Date d'inscription mardi 14 avril 2009 Statut Membre Dernière intervention 29 avril 2009 - 29 avril 2009 à 12:29
A voir également:
- Selection dans un combo
- L'indice n'appartient pas à la sélection vba - Forum VB / VBA
- Outil selection illustrator ne fonctionne pas ✓ - Forum Illustrator
- Vba selection plage variable ✓ - Forum VB / VBA
- Combo cleaner avis ✓ - Forum MacOS
- La commande sélection n'est pas disponible photoshop ✓ - Forum Graphisme
2 réponses
puxor
Messages postés
318
Date d'inscription
mardi 2 septembre 2008
Statut
Membre
Dernière intervention
4 mai 2009
89
28 avril 2009 à 14:19
28 avril 2009 à 14:19
Un script que j'ai pondu y a 2 jours pour un autre topic... fait plaisir que ca puisse resservir des fois :p
<?php header('Content-type: text/html; charset=UTF-8'); ?>
<html>
<head>
</head>
<body>
<?php
$tableauNom = array('Adeline François','Adrian Dearnell','Agnès Léglise','Aïda Touihri');
$tailleTab = count($tableauNom);
echo '<form method="post"><select name="presentateurs" id="presentateurs" onchange="javascript:getName()">';
for($i = 0; $i < $tailleTab; $i++){
echo '<option name="option'. $i .'">'. $tableauNom[$i] .'</option>';
}
echo '</select><br /><br />';
echo '<input type="submit" value="envoyer"/></form>';
if(isset($_POST['presentateurs'])){
$nomPrenom = $_POST['presentateurs'];
$tableauNomPrenom = explode(' ',$nomPrenom);
$prenom = $tableauNomPrenom[0];
$nom = $tableauNomPrenom[1];
echo 'Nom: <input type="text" name="nom" id="nom" value="'. $nom .'"/>Prenom: <input type="text" value="'. $prenom .'" name="prenom" id="prenom"/>';
}else{
echo 'Choisissez un nom dans la liste';
}
?>
</body>
</html>
del-ab91
Messages postés
11
Date d'inscription
mardi 14 avril 2009
Statut
Membre
Dernière intervention
29 avril 2009
29 avril 2009 à 12:29
29 avril 2009 à 12:29
merci