Resultat formulaire onglet + fenetre
bonjours,
je suis pas sur du forum sur lequel il vaudrais réellement poster ce soucis , dans le doute je le poste ici ^^ .
voila, j'ai un formulaire qui affiche les différent élément d un tableau bidimensionnelle , pour après permettre de sélectionner la colonne qui nous intéresse dans ce tableau.
puis le formulaire doit renvoyer les ligne sélectionner sur une nouvelle page.
Mon soucis est que mon formulaire m envoie les données sur un nouvelle onglet, et m ouvre en meme temps ma fameuse fenêtre mais qui elle m'affiche le message comme quoi aucune variable n'a était sélectionnées.
Si quelqu'un peu me renseigner merci a lui.
Voila mon code :/
Code:
1 2
| <form name="selection" id="selection" action="../achat/selection.php" method="post" enctype="multipart/form-data"onsubmit="this.target=window.open(this.action, '',
'toolbar=no, location=no, directories=no, status=yes, scrollbars=yes, resizable=yes, copyhistory=no, width=600, height=350')"> |
Code:
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 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
| <form name="selection" id="selection" action="../achat/selection.php" method="post" enctype="multipart/form-data"onsubmit="this.target=window.open(this.action, '',
'toolbar=no, location=no, directories=no, status=yes, scrollbars=yes, resizable=yes, copyhistory=no, width=600, height=350')">
<table width="100%"style="color=#FFFFFF">
<tr style="height: 16px" align="center">
<td>
<font class="font_p" color="#5d8eb3">
<b>
#
</b>
</font>
</td>
<td>
<font class="font_p" color="#5d8eb3">
<b>
image
</b>
</font>
</td>
<td>
<font class="font_p" color="#5d8eb3">
<b>
nom_du_jeu
</b>
</font>
</td>
<td>
<font class="font_p" color="#5d8eb3">
<b>
date_sortie
</b>
</font>
</td>
<td>
<font class="font_p" color="#5d8eb3">
<b>
nbr de joueurs
</b>
</font>
</td>
<td>
<font class="font_p" color="#5d8eb3">
<b>
prix
</b>
</font>
</td>
<td>
<font class="font_p" color="#5d8eb3">
<b>
quant dispo
</b>
</font>
</td>
<td >
<font class="font_p" color="#5d8eb3">
<b>
acheter
</b>
</font>
</td>
</tr>
<!------------------------------------------------------------------------------------------------------------------------------------>
<!-- fin de l'entete de notre tableau -->
<!------------------------------------------------------------------------------------------------------------------------------------>
<?php
//<!------------------------------------------------------------------------------------------------------------------------------------>
//<!-- on compte le nombre de lignes dans le fichier texte -->
//<!------------------------------------------------------------------------------------------------------------------------------------>
$nb_elements = count($data);
$nb_lignes= $nb_elements;
//<!------------------------------------------------------------------------------------------------------------------------------------>
//<!-- on ouvre une boucle 'for' qui tournera autant de fois qu'il y a de lignes dans le fichier texte -->
//<!------------------------------------------------------------------------------------------------------------------------------------>
for ($i = 0; $i < $nb_lignes; $i ++)
{
$new_ligne= array();
$new_ligne[0]= $data[$i]['id'];
$new_ligne[1]= $data[$i]['nom_du_jeu'];
$new_ligne[2]= $data[$i]['date_sortie'];
$new_ligne[3]= $data[$i]['image'];
$new_ligne[4]=$data[$i]['nbr de joueurs'];
$new_ligne[5]= $data[$i]['prix'];
$new_ligne[6]= $data[$i]['quantite'];
$id=$new_ligne[0];
$nom_du_jeu=$new_ligne[1];
$date=$new_ligne[2];
$image=$new_ligne[3];
$joueurs=$new_ligne[4];
$prix=$new_ligne[5];
$stock=$new_ligne[6];
//<!------------------------------------------------------------------------------------------------------------------------------------>
// <!-- Définition de la position à afficher -->
//<!------------------------------------------------------------------------------------------------------------------------------------>
//<!-- on affiche les infos des jeux dans chaque ligne du tableau-->
//<!------------------------------------------------------------------------------------------------------------------------------------>
if($stock > 0)
{
?>
<tr style="height: 16px" align="center">
<td class="font_p">
<?php
echo
isset($id) ?
"<FONT color='white'>".$id : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
isset($image) ?
"<img src=\" ".$image."\">" : ''
;
?>
</td>
<td>
<?php
echo
isset($nom_du_jeu) ?
"<FONT color='white'>".$nom_du_jeu : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
isset($date) ?
"<FONT color='white'>".$date : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
isset($joueurs) ?
"<FONT color='white'>".$joueurs : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
isset($prix) ?
"<FONT color='white'>".$prix : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
isset($stock) ?
"<FONT color='white'>".$stock : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
"<input type='checkbox' name='id[]' value='".$id."'>"
;
?>
</td>
</tr>
<?php
}
else
{
?>
<tr style="height: 16px" align="center">
<td class="font_p">
<?php
echo
isset($id) ?
"<FONT color='white'>".$id : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
isset($image) ?
"<img src=\" ".$image."\">" : ''
;
?>
</td>
<td>
<?php
echo
isset($nom_du_jeu) ?
"<FONT color='white'>".$nom_du_jeu : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
isset($date) ?
"<FONT color='white'>".$date : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
isset($joueurs) ?
"<FONT color='white'>".$joueurs : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
isset($prix) ?
"<FONT color='white'>".$prix : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
isset($stock) ?
"<FONT color='white'>".$stock : ''. "</FONT>"
;
?>
</td>
<td>
<?php
echo
"<FONT color='red'>rupture de stock</FONT>"
;
?>
</td>
</tr>
<?php
}
}
//<!------------------------------------------------------------------------------------------------------------------------------------>
// <!-- Fin de la boucle for -->
//<!------------------------------------------------------------------------------------------------------------------------------------>
?>
<tr style="height: 16px" align="center">
<td colspan=8>
<input type="submit" value="Envoyer" name="select"/ onClick="valider()">
</td>
</tr>
</table>
</form> |