Bonjour all,

j'essaie de transformé un code avec des checkbox en menu déroulent depuis se matin mais je trouve pas la solution :/

Code originale
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
/*                                                                            */
/* Titre          : Vérifier librement la disponibilité d'un Nom De...        */
/*                                                                            */
/* Auteur         : KOogar                                                    */
/* Date édition   : 12 Avril 2008                                             */
/* Website auteur : http://www.koogar.fr                                      */
/*                                                                            */
 
 
$result = '';
$theNdd = trim($_POST['theNdd']);
$theExt = $_POST['theExt'];
 
if (!empty($theNdd) AND !empty($theExt)) {
 
       $theNdd = preg_replace(array( '/http://www./',
                                     '/http:///',
                                     '/www./' ),
                              array( '', '', '') ,$theNdd);
 
       $theNdd = preg_replace(array( '/.eu/',
                                     '/.fr/',
                                     '/.com/',
                                     '/.net/',
                                     '/.org/',
                                     '/.info/',
                                     '/.biz/',
                                     '/.de/',
                                     '/.me.uk/',
                                     '/.co.uk/',
                                     '/.org.uk/',
                                     '/.ca/' ),
               array( '', '', '', '', '', '', '', '', '', '', '', '') ,$theNdd);
 
        $theNdd = escapeshellcmd($theNdd);
        //on definit les case du tableau à vérifier
        $caseForVerif['.net']=7;
        $caseForVerif['.com']=7;
        $caseForVerif['.org']=0;
        $caseForVerif['.fr']=13;
        $caseForVerif['.ca']=5;
        $caseForVerif['.info']=0;
        $caseForVerif['.biz']=1;
        $caseForVerif['.de']=35;
        $caseForVerif['.eu']=50;
        $caseForVerif['.me.uk']=30;
        $caseForVerif['.co.uk']=30;
        $caseForVerif['.org.uk']=40;
        //on definit les phrase à vérifier dans ces cases
        $strForVerif['.com']='No match for "'.$theNdd.'.COM".';
        $strForVerif['.fr']='%% No entries found in the AFNIC Database.';
        $strForVerif['.net']='No match for "'.$theNdd.'.NET".';
        $strForVerif['.org']='NOT FOUND';
        $strForVerif['.ca']='';
        $strForVerif['.info']='NOT FOUND';
        $strForVerif['.biz']='';
        $strForVerif['.de']='';
        $strForVerif['.eu']='';
        $strForVerif['.me.uk']='';
        $strForVerif['.co.uk']='';
        $strForVerif['.org.uk']='';
        foreach($theExt as $anExt) {
            $myArray="";
            $anExt=escapeshellcmd($anExt);
            exec('whois '.$theNdd.$anExt,$myArray,$retval);
            $result.=(strtolower($myArray[$caseForVerif[$anExt]])==
                      strtolower($strForVerif[$anExt]))?"->> ".$theNdd.$anExt."
                      est libre<br/>":"->> ".$theNdd.$anExt."
                      est déjà réservé<br />";
        }
}
?>
 
<form action="" name="formVeirfNdd" enctype="multipart/form-data" method="post">
www.<input type="text" name="theNdd" value="<?php echo $theNdd; ?>" />
<input name="theExt[]" type="checkbox" value=".com" id="com" checked><label for="com">.com</label>
<input name="theExt[]" type="checkbox" value=".eu" id="eu"><label for="eu">.eu</label>
<input name="theExt[]" type="checkbox" value=".fr" id="fr"><label for="fr">.fr</label>
<input name="theExt[]" type="checkbox" value=".net" id="net"><label for="net">.net</label>
<input name="theExt[]" type="checkbox" value=".org" id="org"><label for="org">.org</label>
<input name="theExt[]" type="checkbox" value=".info" id="info"><label for="info">.info</label>
<input name="theExt[]" type="checkbox" value=".ca" id="ca"><label for="ca">.ca</label>
<input name="theExt[]" type="checkbox" value=".biz" id="biz"><label for="biz">.biz</label>
<input name="theExt[]" type="checkbox" value=".de" id="de"><label for="de">.de</label>
<input name="theExt[]" type="checkbox" value=".me.uk" id="me.uk"><label for="me.uk">me.uk</label>
<input name="theExt[]" type="checkbox" value=".co.uk" id="co.uk"><label for="co.uk">co.uk</label>
<input name="theExt[]" type="checkbox" value=".org.uk" id="org.uk"><label for="org.uk">org.uk</label>
<input type="submit" value="Vérifier">
</form>
 
<?php echo '<h3>'.$result.'</h3>';  ?>
et le code que j'essaie de mettre en menu liste.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<td colspan="2"><?php
/*                                                                            */
/* Titre          : Vérifier librement la disponibilité d'un Nom De...        */
/*                                                                            */
/* Auteur         : KOogar                                                    */
/* Date édition   : 12 Avril 2008                                             */
/* Website auteur : http://www.koogar.fr                                      */
/*                                                                            */
 
 
$result = '';
$theNdd = trim($_POST['theNdd']);
$theExt = $_POST['theExt'];
 
if (!empty($theNdd) AND !empty($theExt)) {
$theNdd = preg_replace(array( '/.eu/',
                                     '/.fr/',
                                     '/.com/',
                                     '/.net/',
                                     '/.org/',
                                     '/.info/',
                                     '/.biz/',
                                     '/.de/',
                                     '/.me.uk/',
                                     '/.co.uk/',
                                     '/.org.uk/',
                                     '/.ca/' ),
               array( '', '', '', '', '', '', '', '', '', '', '', '') ,$theNdd);
 
        $theNdd = escapeshellcmd($theNdd);
        //on definit les case du tableau à vérifier
        $caseForVerif['.net']=7;
        $caseForVerif['.com']=7;
        $caseForVerif['.org']=0;
        $caseForVerif['.fr']=13;
        $caseForVerif['.ca']=5;
        $caseForVerif['.info']=0;
        $caseForVerif['.biz']=1;
        $caseForVerif['.de']=35;
        $caseForVerif['.eu']=50;
        $caseForVerif['.me.uk']=30;
        $caseForVerif['.co.uk']=30;
        $caseForVerif['.org.uk']=40;
        //on definit les phrase à vérifier dans ces cases
        $strForVerif['.com']='No match for "'.$theNdd.'.COM".';
        $strForVerif['.fr']='%% No entries found in the AFNIC Database.';
        $strForVerif['.net']='No match for "'.$theNdd.'.NET".';
        $strForVerif['.org']='NOT FOUND';
        $strForVerif['.ca']='';
        $strForVerif['.info']='NOT FOUND';
        $strForVerif['.biz']='';
        $strForVerif['.de']='';
        $strForVerif['.eu']='';
        $strForVerif['.me.uk']='';
        $strForVerif['.co.uk']='';
        $strForVerif['.org.uk']='';
        foreach($theExt as $anExt) {
            $myArray="";
            $anExt=escapeshellcmd($anExt);
            exec('whois '.$theNdd.$anExt,$myArray,$retval);
            $result.=(strtolower($myArray[$caseForVerif[$anExt]])==
                      strtolower($strForVerif[$anExt]))?"->> ".$theNdd.$anExt."
                      est libre<br/>":"->> ".$theNdd.$anExt."
                      est déjà réservé<br />";
        }
}
?>
        <h1>Vérificateur de Nom De Domaine</h1></td>
      </tr>
      <tr>
        <td><form action="" name="formVeirfNdd" enctype="multipart/form-data" method="post">
www.<input type="text" name="theNdd" value="<?php echo $theNdd; ?>" />
<select name="select">
<option name="theExt[]" value=".com" id="com"><label for="com">.com</label></option>
<option name="theExt[]" value=".eu" id="eu"><label for="eu">.eu</label></option>
<option name="theExt[]" value=".fr" id="fr"><label for="fr">.fr</label></option>
<option name="theExt[]" value=".net" id="net"><label for="net">.net</label></option>
<option name="theExt[]" value=".org" id="org"><label for="org">.org</label></option>
<option name="theExt[]" value=".info" id="info"><label for="info">.info</label></option>
<option name="theExt[]" value=".ca" id="ca"><label for="ca">.ca</label></option>
<option name="theExt[]" value=".biz" id="biz"><label for="biz">.biz</label></option>
<option name="theExt[]" value=".de" id="de"><label for="de">.de</label></option>
<option name="theExt[]" value=".me.uk" id="me.uk"><label for="me.uk">me.uk</label></option>
<option name="theExt[]" value=".co.uk" id="co.uk"><label for="co.uk">co.uk</label></option>
<option name="theExt[]" value=".org.uk" id="org.uk"><label for="org.uk">org.uk</label></option>
<input type="submit" value="Vérifier"></select>
</form></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><div align="center"><?php echo '<h3>'.$result.'</h3>';  ?></div></td>
j'ai bien le menu déroulant mais que je clic sur vérifié aucun résulta.

Cordialement Stéphane