bonjour,

j'ai un script qui poste un formulaire qui contient la variable recherche :
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
94
 
#!"C:\perl\bin\perl.exe"
use strict;
use warnings;
use CGI::Session;
use CGI::Carp 'fatalsToBrowser';
$CGI::POST_MAX        = 1024 * 100;    # max 100K posts
$CGI::DISABLE_UPLOADS = 1;             # no uploads
my $session = new CGI::Session("driver:File", undef, {Directory=>"/"});
my $q  = $session->query;
$q->import(':standard');
#my $cookie = $session->cookie(CGISESSID => $session->id);
my $erreur    = "";
my $action    = "result.pl";
my $method    = "post";
my $encoding  = "application/x-www-form-urlencoded";
my $styleForm = "border:0px;margin:0px";
 
 
print header(
    #-cookie=>$cookie,
    -type    => "text/html",
    -charset => "iso-8859-1"
);
 
print start_html(
    -title => "Clustering Meta-Engine 2 Perl version",""
    ,
    -meta => { 'http-equiv' => "Content-Type", charset => "UTF-8" },
 
    -style        => { "src" => "/images/mmc-css.css" },
    -leftmargin   => "0",
    -rightmargin  => "0",
    -topmargin    => "0",
    -bottommargin => "0"
  ),
div(
    { -class => "page", -align => "center" },
 
    br(),
    a(
        { -href => "index.pl" },
        img({
            src    => "/images/cme.jpg",
            width  => "232px",
            height => "124px",
            border => "0",
            alt    => "Conceptual Meta-Engine"
        }
        )
    ),
  ),
start_form(
    -method  => $method,
    -action  => $action,
    -enctype => $encoding,
    { -style => $styleForm }
  ),br(),
  div(
    { -style => 'text-align:center' },
    span( { class => "sstitre" }, "0o A meta clustering engine o0" ),
    br(),
    br(),
    textfield(
        { class => "formulaires" }, { style => "width:500px;" },
        -name      => "recherche",
        -default   => "Query me",
        -override  => 1,
        -size      => 300,
        -maxlength => 500
    ),
  ),
  p(
    { -style => 'text-align:center' },
    submit(
        -name  => "bouton",
        -value => "search"
    )
  ),
  endform(),
  br(), br(),
  div(
    { -style => 'text-align:center' },
  span( { class => "texte_little", -align => "center" }, "Clustering Meta-Engine 2 © **************",br(), img({
            src    => "/images/perl.gif",
            width  => "74px",
            height => "34px",
            border => "0",
            alt    => "Propulsé par PERL"
        })
       ),
  ),
  br(), br(),
  end_html();
ce script recoit la variable recherche et devrait l'afficher, or il ne l'affiche pas :/

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
 
#!"C:\perl\bin\perl.exe"
use warnings;
use strict;
use CGI::Session;
my $cgi =  CGI::Session->load() or die CGI::Session->errstr();
use CGI::Carp 'fatalsToBrowser';
my $q  = $cgi->query;
my $recherche = $q->param('recherche');
print $cgi->header();
 
print("\n\n recherche = $recherche");
quelqu'un peut il m'indiquer pourquoi ?