Bonsoir,
je n'arrive pas à faire fonctionner ma requete me prmettant de pouvoir rentrer 2/5 chiffres dans mon champ biensecteur, cela ne marche qu'avec 5.

J'ai tout essayé et rien.....

Merci d'avance de votre aide

Cdt
Bruno


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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?php
include_once("req_connecter.php");
 
session_start();
if($lng==""){
$lang=$lng;
$_SESSION["lang"]=$lang;
}else{
$lang=$_SESSION["lang"];
}
 
include_once("langue.php");
 
if($search==1){ include_once("biens_liste2.php"); exit(); }
 
?>
<html>
<head>
<title>Rechercher</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {    background-color: #666666;}
body,td,th {    font-family: Arial,;    font-size: 12px;    color: #ffffff;    font-style: normal;    line-height: normal;    font-weight: 100;}
a {    font-size: 24px;    color: #FAC634;    font-weight: bold;}
a:visited {    color: #000000;    text-decoration: none;}
a:hover {    color: #645D90;    text-decoration: none;}
a:active {    color: #645D90;    text-decoration: none;}
a:link {    text-decoration: none;    color: #990000;}
 
a.standard {    font-family: Arial; font-size: 16px;    color: #333333;}
a.standard:link {    text-decoration: none;    color: #333333;}
a.standard:visited {    text-decoration: none;    color: #333333;}
a.standard:hover {    text-decoration: none;    color: #990000;}
a.standard:active {    text-decoration: none;    color: #333333;}
.Style14 {color: #000000}
.Style24rouge {    font-size: 24px;    font-weight: bold;    font-family: Arial, Helvetica, sans-serif;    color: #000000;    font-style: normal;    line-height: normal;    font-variant: normal;}
h1,h2,h3,h4,h5,h6 {    font-family: Arial, Helvetica, sans-serif;    font-weight: bold;}
h2 {    font-size: 12px;    color: #000000;}
 
INPUT.i1, TEXTAREA.i1, SUBMIT.i1, SELECT.i1, OPTION.i1, BUTTON.i1 {
border-style: solid; border-width: 1px; border-color:#999999; background-color: #FFFFFF; font-size: 9pt; font-family: arial, helvetica, sans serif;
}
 
table.t1, table.t3 { border-spacing: 0; }
 
td.t1 { border-color: #000000;
border-style: solid;
margin: 0px;
padding: 0px;
border-width: 0px 0px 0px 0px;
}
td.t2 { border-color: #000000;
border-style: solid;
margin: 0px;
padding: 0px;
border-width: 0px 0px 0px 0px;
}
 
td.t3 { border-color: #000000;
border-style: solid;
margin: 0px;
padding: 0px;
border-width: 0px 0px 0px 0px;
}
.Style23 {color: #666666}
.Style29 {    color: #36A828;
    font-size: 15px;
    font-weight: bold;
}
.Style36 {font-size: 9px}
.Style37 {
    color: #FFFFFF;
    font-weight: bold;
}
.Style40 {font-size: 12px; font-weight: bold; color: #FFFFFF; }
.Style41 {color: #FFFFFF}
 
-->
</style>
<script language="javascript">
function srch(){
document.regform.search.value=1;
document.regform.submit();
}
 
function init(){
document.regform.bienville.value="";
document.regform.biensecteur.value="";
document.regform.biensurfacemini.value="";
document.regform.biensurfacemaxi.value="";
document.regform.tybiref.value=0;
document.regform.submit();
}
</script>
</head>
<body>
<form target="_blank" method="post" name="regform" action="plan_secteurs.php">
<p>
<input type="hidden" name="search" value=""> 
</p>
<div align="left">
<div align="left">
<div align="left">
<table width="13%" border="0" cellpadding="5" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#666666" style="border-collapse: collapse">
<tr bgcolor="#FFFFFF">
<td height="27" bordercolor="#FFFFFF" bgcolor="#666666" ><span class="Style29"><font face='Arial'><font face='Arial'>RECHERCHE RAPIDE</font></font></span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="152" height="17" bordercolor="#FFFFFF" bgcolor="#666666" ><span class="Style37"><font face='Arial'><font face='Arial'>TYPE</font></font></span></td>
</tr>
<tr>
<td height="30" align="left" valign="middle" background="#FFFFFF" bgcolor="#666666" class="Style14" ><select class="i1" name="tybiref">
<option value="0"><?php echo $lg[1]; ?></option>
<?php
$order="1";
switch($lang){
case "en" : $order = "2"; break;
case "it" : $order = "3"; break;
case "de" : $order = "4"; break;
case "su" : $order = "5"; break;
case "fi" : $order = "6"; break;
}
$SQL="SELECT * FROM types_de_biens WHERE tybisuppr=0 ORDER BY tybinom".$order;
$affichage=mysql_query($SQL);
$nb=mysql_numrows($affichage);
if($nb){
while($ligne=mysql_fetch_array($affichage)){
$tybiref2=stripslashes($ligne["tybiref"]);
$tybinom=stripslashes($ligne["tybinom1"]);
$tybinom2=stripslashes($ligne["tybinom2"]);
$tybinom3=stripslashes($ligne["tybinom3"]);
$tybinom4=stripslashes($ligne["tybinom4"]);
$tybinom5=stripslashes($ligne["tybinom5"]);
$tybinom6=stripslashes($ligne["tybinom6"]);
if($lang=="en"){ $tybinom=$tybinom2; }
if($lang=="it"){ $tybinom=$tybinom3; }
if($lang=="de"){ $tybinom=$tybinom4; }
if($lang=="su"){ $tybinom=$tybinom5; }
if($lang=="fi"){ $tybinom=$tybinom6; }
echo "<option value=\"".$tybiref2."\"";
if($tybiref==$tybiref2){ echo " selected"; }
echo ">".$tybinom."</option>";
}
}
 
 
?>
</select></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" bgcolor="#666666" ><span class="Style40"><font face='Arial'>VILLE</font></span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" bgcolor="#666666" ><input name="bienville" type="text" class="Style14" size="20" maxlength="35" value="<?php echo $bienville; ?>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" bgcolor="#666666" ><span class="Style40"><font face='Arial'>CODE POSTAL </font></span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" bordercolor="#FFFFFF" bgcolor="#666666" > <input name="biensecteur" type="text" class="Style14" size="5" maxlength="5" value="<?php echo $biensecteur; ?>" >            </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" bordercolor="#FFFFFF" bgcolor="#666666" ><span class="Style40"><font face='Arial'>SURFACE</font></span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="17" bordercolor="#FFFFFF" bgcolor="#666666" ><table width="96" border="0">
<tr>
<td width="25" height="30" align="right" valign="middle" background="#FFFFFF" ><p class="Style36 Style41">ENTRE</p> </td>
<td width="22" align="left" valign="middle" background="#FFFFFF" ><div align="left">
<input name="biensurfacemini" type="text" class="i1" size="4" maxlength="6" value="<?php echo $biensurfacemini; ?>">
</div></td>
<td width="18" align="right" valign="middle" background="#FFFFFF" ><div align="center"><span class="Style36 Style41">ET</span></div></td>
<td width="24" align="left" valign="middle" background="#999999" bgcolor="#666666" ><div align="left">
<input name="biensurfacemaxi" type="text" class="i1" size="4" maxlength="6" value="<?php echo $biensurfacemaxi; ?>">
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#666666" height="20" align="center" class="Style14"><p class="Style23">
<input name="Submit" type="button" class="standard" onClick="srch();" value="<?php echo $lg[56]; ?>">
</p></td>
</tr>
</table>
</div>
</div>
</div>
<?php
 
if (isset($_POST['Submit'])){
if (isset($_POST['biensecteur'])){
$code=$_POST['biensecteur'];
$req=mysql_query("SELECT biensecteur FROM biens WHERE biensecteur LIKE '".$code."%'",$cnx) or die("Erreur Code".mysql_error());
if(mysql_num_rows($req)!=0){
while($JeuEnr=mysql_fetch_assoc($req)){
echo $JeuEnr['biensecteur'].'<br/>';
}
}
}
 
}
?>
</form>
 
 
</body>
</html>
 
<?php include_once("req_deconnecter.php"); ?>