Précédent   Forum des professionnels en informatique > PHP > PHP & SGBD > PDO
PDO Forum d'entraide sur PDO (PHP Data Objects) : pilote générique de bases de données avec PHP. Avant de poster -> FAQ PDO et Cours PDO
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 26/11/2011, 14h25   #1
Membre Expert
 
Avatar de beegees
 
Homme David Vincent (l'homme qui a vu les extra-terrestres)
Développeur Web
Inscription : mars 2004
Messages : 3 240
Détails du profil
Informations personnelles :
Nom : Homme David Vincent (l'homme qui a vu les extra-terrestres)
Âge : 37
Localisation : Belgique

Informations professionnelles :
Activité : Développeur Web
Secteur : Enseignement

Informations forums :
Inscription : mars 2004
Messages : 3 240
Points : 1 048
Points : 1 048
Par défaut J'ai plusieurs notice dans ma page web

Bonjour à tous,

J'ai créé une requête avec PDO :

Code :
1
2
3
4
5
6
7
 
$sql_check = $conn->prepare("SELECT * FROM neuro_patient WHERE dmu_number = :DMU ");
	$data = array(':DMU'=>$dmu);
	$sql_check->execute($data);
 
	$data = $sql_check->fetch();
	var_dump($data);
Le var_dump me donne ceci :
Citation:
array
'anapath' => string '' (length=0)
0 => string '' (length=0)
'name' => string 'JACKSON' (length=7)
1 => string 'JACKSON' (length=7)
'firstname' => string 'Joe' (length=3)
2 => string 'Joe' (length=3)
'gender' => string '0' (length=1)
3 => string '0' (length=1)
'date_of_birth' => string '1901-02-05 00:00:00.000' (length=23)
4 => string '1901-02-05 00:00:00.000' (length=23)
'date_of_death' => string '2011-10-24 00:00:00.000' (length=23)
5 => string '2011-10-24 00:00:00.000' (length=23)
'dmu_number' => string '19010205MJ01' (length=12)
6 => string '19010205MJ01' (length=12)
'date_of_last_visit' => string '2011-10-01 00:00:00.000' (length=23)
7 => string '2011-10-01 00:00:00.000' (length=23)
J'obtiens pourtant des notices :

Citation:
Notice: Undefined index: dmu_number in C:\Program Files (x86)\EasyPHP-5.3.6.0\www\Neuro2\includes\ajout_patient.php on line 13
avec cette ligne de code :

Code :
1
2
 
<input type="text" onchange="verifier_dmu(this.value,this.id);" id="txt_dmu" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['dmu_number'].'" disabled="disabled"'; ?> />
Auriez-vous une idée svp ?

Merci d'avance pour votre aide.

beegees
__________________
beegees est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2011, 16h27   #2
Expert Confirmé
 
Avatar de rawsrc
 
Homme Martin
Dev indep
Inscription : mars 2004
Messages : 1 462
Détails du profil
Informations personnelles :
Nom : Homme Martin
Âge : 35
Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

Informations professionnelles :
Activité : Dev indep

Informations forums :
Inscription : mars 2004
Messages : 1 462
Points : 2 552
Points : 2 552
Envoyer un message via Skype™ à rawsrc
Bonjour,
Vu qu'il n'y pas tout le code et pour savoir ce que contient $data au moment de l'affichage tu n'as qu'à poser un print_r($data); juste avant ta ligne 13
__________________
# Dans la Création, tout est permis mais tout n'est pas utile...
rawsrc est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2011, 18h30   #3
Membre Expert
 
Avatar de beegees
 
Homme David Vincent (l'homme qui a vu les extra-terrestres)
Développeur Web
Inscription : mars 2004
Messages : 3 240
Détails du profil
Informations personnelles :
Nom : Homme David Vincent (l'homme qui a vu les extra-terrestres)
Âge : 37
Localisation : Belgique

Informations professionnelles :
Activité : Développeur Web
Secteur : Enseignement

Informations forums :
Inscription : mars 2004
Messages : 3 240
Points : 1 048
Points : 1 048
Citation:
Envoyé par rawsrc Voir le message
Bonjour,
Vu qu'il n'y pas tout le code et pour savoir ce que contient $data au moment de l'affichage tu n'as qu'à poser un print_r($data); juste avant ta ligne 13
Bonjour,

Voici le contu du print_r($data) :

Citation:
Array ( [anapath] => [0] => [name] => JACKSON [1] => JACKSON [firstname] => Joe [2] => Joe [gender] => 0 [3] => 0 [date_of_birth] => 1901-02-05 00:00:00.000 [4] => 1901-02-05 00:00:00.000 [date_of_death] => 2011-10-24 00:00:00.000 [5] => 2011-10-24 00:00:00.000 [dmu_number] => 19010205MJ01 [6] => 19010205MJ01 [date_of_last_visit] => 2011-10-01 00:00:00.000 [7] => 2011-10-01 00:00:00.000 )
Qu'en penses-tu ?

D'avance, merci pour l'aide.

beegees
__________________
beegees est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2011, 18h40   #4
Expert Confirmé
 
Avatar de rawsrc
 
Homme Martin
Dev indep
Inscription : mars 2004
Messages : 1 462
Détails du profil
Informations personnelles :
Nom : Homme Martin
Âge : 35
Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

Informations professionnelles :
Activité : Dev indep

Informations forums :
Inscription : mars 2004
Messages : 1 462
Points : 2 552
Points : 2 552
Envoyer un message via Skype™ à rawsrc
Bon là je vois pas trop, mets nous le code de ton fichier ajout_patient.php
Et si tu remplace $data['dmu_number'] par $data[6] tu as toujours tes notices ?
__________________
# Dans la Création, tout est permis mais tout n'est pas utile...
rawsrc est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2011, 18h42   #5
Membre Expert
 
Avatar de beegees
 
Homme David Vincent (l'homme qui a vu les extra-terrestres)
Développeur Web
Inscription : mars 2004
Messages : 3 240
Détails du profil
Informations personnelles :
Nom : Homme David Vincent (l'homme qui a vu les extra-terrestres)
Âge : 37
Localisation : Belgique

Informations professionnelles :
Activité : Développeur Web
Secteur : Enseignement

Informations forums :
Inscription : mars 2004
Messages : 3 240
Points : 1 048
Points : 1 048
Citation:
Envoyé par rawsrc Voir le message
Bon là je vois pas trop, mets nous le code de ton fichier ajout_patient.php
Le voici, merci :

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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
<?php 
	//include('connexion.php'); 
	//session_start();
	var_dump($_SESSION);
?>
 
 
	<h3><a href="#">Demographic data</a></h3>
	<div>
		<p>
			<!-- je mets un champ caché afin de savoir si je dois mettre à jour le champ avec ajax (sur le onchange) ou pas, pas besoin d'appeler l'évènement onchange si on n'en a pas besoin -->
            <input type="hidden" id="txt_dmu_old" <?php  if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['dmu_number'].'"'; else echo 'value=""';?> /> Dmu number : 
            <input type="text" onchange="verifier_dmu(this.value,this.id);" id="txt_dmu" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['dmu_number'].'" disabled="disabled"'; ?> />
<label id="existe_deja"></label>
		</p>
 
 
 
        <p>
       	  <input type="hidden" id="txt_name_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['name'].'"'; else echo 'value=""';?> />
        	Name : <input type="text" id="txt_name" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['name'].'"'; ?> onchange="Enregistrer_info_on_change('neuro_patient#name',this.value,this.id);" /> <label id="label_name"></label>
        </p>
        <p>
       	<input type="hidden" id="txt_firstname_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['firstname'].'"'; else echo 'value=""';?> />
        	Firstname : <input type="text" id="txt_firstname" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['firstname'].'"'; ?> onchange="Enregistrer_info_on_change('neuro_patient#firstname',this.value,this.id);" /> <label id="label_firstname"></label>
        </p>
        <p>
 
        	Gender : <select id="sel_gender"> 
            	<option value="-1" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK" && $data['gender'] == -1) echo 'selected="selected"'; ?>>-----</option>
                <option value="M" <?php if(isset($_SESSION['MAJ'])&& $_SESSION['MAJ'] == "OK" && $data['gender'] == 0) echo 'selected="selected"'; ?>>Male</option>
                <option value="F" <?php if(isset($_SESSION['MAJ'])&& $_SESSION['MAJ'] == "OK" && $data['gender'] == 1) echo 'selected="selected"'; ?>>Female</option>
            </select> <span><label id="label_gender"></label></span>
        </p>
        <p>
        	<input type="hidden" id="txt_dob_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['date_of_birth'].'"'; else echo 'value=""';?> />
        	Birth date : <input type="text" disabled="disabled" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['date_of_birth'].'"'; ?> id="txt_dob" class="datepicker" onchange="Enregistrer_info_on_change('neuro_patient#date_of_birth',this.value,this.id);" onfocus="Enregistrer_info_on_change('neuro_patient#date_of_birth',this.value,this.id);" /> <label id="label_dob"></label>
        </p>
        <p>
        	<input type="hidden" id="txt_dod_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['date_of_death'].'"'; else echo 'value=""';?> />
        	Deceased date : <input type="text" id="txt_dod" class="datepicker" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['date_of_death'].'"'; ?> onchange="if(verif_date(document.getElementById('txt_dlv').value,this.value)) Enregistrer_info_on_change('neuro_patient#date_of_death',this.value,this.id);Enregistrer_info_on_change('neuro_patient#date_of_last_visit',this.value,this.id);" /> <label id="label_dod"></label>
        </p>
 
        <p>
        	<input type="hidden" id="txt_dlv_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data['date_of_last_visit'].'"'; else echo 'value=""';?> />
            <?php 
			if(isset($_SESSION['dmu']))
			{
				$sql = "SELECT * FROM neuro_event WHERE patient_id ='".$_SESSION['dmu']."' AND SUBSTR(content_type_id,1,5) = 'Visit'";
				$query = mysql_query($sql);
				$date_last_visit = mysql_fetch_array($query);
				$nombre_res = mysql_num_rows($query);
			}
 
			?>
        	Date of last visit : <input type="text" id="txt_dlv" class="datepicker" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$date_last_visit['event_date'].'"'; ?> onchange="if(verif_date(this.value, document.getElementById('txt_dod').value)) Enregistrer_info_event_on_change('event#visit#'+document.getElementById('id_examen').value,this.value, this.id);" /> <label id="label_dlv"></label>
            <input type="hidden" id="id_examen" <?php if(isset($nombre_res) && $nombre_res > 0 ) echo "value='".$date_last_visit['content_type_id']."'"; ?> />
        </p>
	</div>
	<h3><a href="#">Non onco anteriority</a></h3>
	<div>
		 		Type of Anteriority :
                <input type="hidden" id="sel_non_oco_anteriority_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_non_onco['anteriority_type'].'"'; else echo 'value=""';?> />
                <!-- le onchange permet de sauvegarder les changemetns sans rechargement de page -->
                <select id="sel_non_oco_anteriority" onchange="Enregistrer_info_on_change('neuro_nononcoanteriority#anteriority_type',this.value,this.id);">
                <option value="">------</option>
                <?php 
					$sql_anteriority = "SELECT * FROM neuro_nononcoanteriority_choices"; 
					$query_anteriority = mysql_query($sql_anteriority);
					while($items = mysql_fetch_array($query_anteriority))
					{
						echo '<option value="'.$items['Value'].'"';
						if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&(trim($data_non_onco['anteriority_type']) == trim($items['Value']))) echo 'selected="selected"';
						echo '>'.$items['Name'].'</option>';
					}
				?>
                </select>
 
	</div>
	<h3><a href="#">Onco anteriority</a></h3>
	<div>
		 <p>
         	Cancer type :
        <input type="hidden" id="sel_Cancer_type_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")
			{
				echo 'value="'.$data_onco['cancer_type_id'].'"';	
			} 
			else 
			{
				echo 'value=""';	
			}
			?> 
        />
		 <select name="sel_Cancer_type" id="sel_Cancer_type" onchange="Enregistrer_info_on_change('neuro_oncoanteriority#cancer_type_id',this.value,this.id);">
		   <option value="">------</option>
		   <?php 
                $sql = "SELECT * FROM neuro_cancertype"; 
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                {
                    echo '<option value="'.$items['id'].'"';
					if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&(trim($data_onco['cancer_type_id']) == trim($items['id']))) echo 'selected="selected"';
					echo '>'.$items['name'].'</option>';
                }
            ?>
		   </select>
		 </p>    
 
        <p>
       	  <input type="hidden" id="sel_surgery_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_onco['surgery'].'"'; else echo 'value=""';?> /> 
            Surgery     
        	<select id="sel_surgery" onchange="Enregistrer_info_on_change('neuro_oncoanteriority#surgery',this.value,this.id);">
    			<option>------</option>
                <option value="Y" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_onco['surgery']) == 'Y') echo 'selected="selected"'; ?>>YES</option>
                <option value="N" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_onco['surgery']) == 'N') echo 'selected="selected"'; ?>>NO</option>
    		</select>
        </p>
        <p>
        	<input type="hidden" id="sel_radiotherapy_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_onco['radiotherapy'].'"'; else echo 'value=""';?> />
    		Radiotherapy <select id="sel_radiotherapy" onchange="Enregistrer_info_on_change('neuro_oncoanteriority#radiotherapy',this.value,this.id);">
    			<option>------</option>
                <option value="Y" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_onco['radiotherapy']) == 'Y') echo 'selected="selected"'; ?>>YES</option>
                <option value="N" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_onco['radiotherapy']) == 'N') echo 'selected="selected"'; ?>>NO</option>
    		</select>    	
        </p>
        <p>
        	<input type="hidden" id="sel_chemotherapy_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_onco['chemotherapy'].'"'; else echo 'value=""';?> />
            Chemotherapy 
            <select id="sel_chemotherapy" onchange="Enregistrer_info_on_change('neuro_oncoanteriority#chemotherapy',this.value,this.id);">
    			<option>------</option>
                <option value="Y" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_onco['chemotherapy']) == 'Y') echo 'selected="selected"'; ?>>YES</option>
                <option value="N" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_onco['chemotherapy']) == 'N') echo 'selected="selected"'; ?>>NO</option>
    		</select>
        </p>       
 
	</div>
    <h3><a href="#">Cerebral anteriority</a></h3>
    <div>
 
      <p>
        <input type="hidden" id="cerebral_date_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_cerebral['date'].'"'; else echo 'value=""';?> />
        Event date <?php $limite = (date('Y')-20); ?>
<select id="sel_annee#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#date',this.value+'-'+document.getElementById('exam_mois#1').value+'-'+document.getElementById('sel_jour#1').value,this.id);">
            	<option>Year</option>
                <?php 
					for ($i = date('Y'); $i >= $limite; $i--)
					{
						echo '<option value='.$i.'>'.$i.'</option>';
					}
				?>
            </select>
      <select name="exam_mois#" id="exam_mois#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#date',document.getElementById('sel_annee#1').value+'-'+this.value+'-'+document.getElementById('sel_jour#1').value,this.id);">
        <option value="00">Month</option>
        <?php
					for($month = 1; $month <= 12; $month++)
					{
						if($month < 10) $month = "0" . $month;
						echo '<option>'.$month.'</option>';
					}
				?>
      </select>
      <select name="sel_jour#1" id="sel_jour#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#date',document.getElementById('sel_annee#1').value+'-'+document.getElementById('exam_mois#1').value+'-'+this.value,this.id);">
        <option value="00">Day</option>
        <?php
					for($day = 1; $day <= 31; $day++)
					{
						if($day < 10) $day = "0" . $day;
						echo '<option>'.$day.'</option>';
					}
				?>
      </select>
      </p>
 
 
      <div>
			<div>
 
          <?php 
		  	if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")
			{
				$sql_snomed = "SELECT * FROM neuro_cerebralanteriority WHERE patient_id = '".$_SESSION['dmu']."'";
				$query_snomed = mysql_query($sql_snomed);
				$snomed = mysql_fetch_array($query_snomed);
			}
		  ?>  
 
         <label for="snomed">SNOMED T</label>
         <select id="sel_snomed_id#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#icdo_id',this.value,this.id);">
            <option value="">------</option>
            <?php 
                $sql = "SELECT * FROM neuro_snomed WHERE Code LIKE '%T%' ORDER BY description "; 
 
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                {
                    echo '<option value="'.$items['ID'].'"';
					if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&(trim($snomed['icdo_id']) == trim($items['ID']))) echo 'selected="selected"';
					echo '>'.$items['description'].'</option>';
                }
            ?>
        </select>
        <select id="sel_snomed_code#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#icdo_code',this.value,this.id);">
            <option value="">------</option>
            <?php 
                $sql = "SELECT * FROM `neuro_snomed` WHERE `Code` LIKE '%T%'"; 
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                {
                    echo '<option value="'.$items['ID'].'"';
					if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&(trim($snomed['icdo_id']) == trim($items['ID']))) echo 'selected="selected"';
					echo '>'.$items['Code'].'</option>';
                }
            ?>
        </select>
        <br />
        <label for="snomed">SNOMED M</label><select id="sel_snomed_sous_cat_desc#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#ICD0_sous_categorie',this.value,this.id);">
            <option value="">------</option>
            <?php 
                $sql = "SELECT * FROM neuro_snomed WHERE Code LIKE '%M%' ORDER BY description";
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                {
                    echo '<option value="'.$items['ID'].'"';
					if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&(trim($snomed['ICD0_sous_categorie']) == trim($items['ID']))) echo 'selected="selected"';
					echo '>'.$items['description'].'</option>';
                }
            ?>
        </select>
			<select name="sel_snomed_sous_cat_code#" id="sel_snomed_sous_cat_code#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#ICD0_sous_categorie',this.value,this.id);">
			  <option value="">------</option>
			  <?php 
                $sql = "SELECT * FROM neuro_snomed WHERE Code LIKE '%M%' ORDER BY description"; 
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                {
                    echo '<option value="'.$items['ID'].'"';
					if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&(trim($snomed['ICD0_sous_categorie']) == trim($items['ID']))) echo 'selected="selected"';
					echo '>'.$items['Code'].'</option>';
                }
            ?>
			  </select>
			</div>
 
 
 
 
	</div>
 
 
        </p>
 
        <p><span><img src="images/ajouter.png" id="img_add_place" title="Add a place of surgery" onclick="ajouter_place('place#1');" /></span> Place of surgery 
        	<input type="hidden" id="place_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$items['id'].'"'; else echo 'value=""';?> />
            <?php 
		  	if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")
			{
				$sql_place_id = "SELECT place_id FROM neuro_cerebralanteriority WHERE patient_id = '".$_SESSION['dmu']."'";
				$query_place_id = mysql_query($sql_place_id);
				$place_id = mysql_fetch_array($query_place_id);
			}
		  ?>  
 
            <select id="place#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#place_id',this.value,this.id);">
            	<option value="">---------</option> 
            	<?php 
				$sql = " SELECT * FROM neuro_anteriorityplace ORDER BY name";
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                {
 
					echo '<option value="'.$items['id'].'"';
					if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&(trim($items['id']) == trim($place_id['place_id'])))
					{
						echo ' selected="selected" ';	
					}
					echo '>'.$items['name'].'</option>';
 
                }
            ?>	
            </select> 
        Surgery 
        <input type="hidden" id="sel_cerebral_$surgery_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_cerebral['surgery'].'"'; else echo 'value=""';?> />
 
        <select id="sel_cerebral_$surgery#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#surgery',this.value,this.id);">
          <option>-----</option>
          <option value="Y" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_cerebral['surgery']) == 'Y') echo 'selected="selected"'; ?>>YES</option>
          <option value="N" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_cerebral['surgery']) == 'N') echo 'selected="selected"'; ?>>NO</option>
        </select>
 
 
       	  Radiotherapy 
          <input type="hidden" id="sel_cerebral_radiotherapy_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_cerebral['radiotherapy'].'"'; else echo 'value=""';?> />
            <select id="sel_cerebral_radiotherapy#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#radiotherapy',this.value,this.id);">
              <option>-----</option>
              <option value="Y" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_cerebral['radiotherapy']) == 'Y') echo 'selected="selected"'; ?>>YES </option>
              <option value="N" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_cerebral['radiotherapy']) == 'N') echo 'selected="selected"'; ?>>NO</option>
            </select>
 
        Chemotherapy 
          <input type="hidden" id="sel_cerebral_chemotherapy_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_cerebral['chemotherapy'].'"'; else echo 'value=""';?> />
            <select id="sel_cerebral_chemotherapy#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#chemotherapy',this.value,this.id);">
              <option>-----</option>
              <option value="Y" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_cerebral['chemotherapy']) == 'Y') echo 'selected="selected"'; ?>>YES</option>
              <option value="N" <?php if( isset($_SESSION['MAJ']) &&  ($_SESSION['MAJ'] == "OK")&&($data_cerebral['chemotherapy']) == 'N') echo 'selected="selected"'; ?>>NO</option>
            </select>
        GAMMA KNIFE : 
          <select id="sel_gamma_knife_cerebral_ant#1" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#gamma_knife',this.value,this.id);">
            <option>-----</option>
            <option value="Y" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_cerebral['gamma_knife']) == 'Y') echo 'selected="selected"'; ?>>YES</option>
            <option value="N" <?php if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&($data_cerebral['gamma_knife']) == 'N') echo 'selected="selected"'; ?>>NO</option>
          </select>
        </p>
</div>
 
<h3><a href="#">Cerebral anteriority 2</a></h3>
<div>
 
      <p>
        <input type="hidden" id="cerebral_date_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_cerebral['date'].'"'; else echo 'value=""';?> />
        Event date <?php $limite = (date('Y')-20); ?>
<select id="sel_annee#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#date',this.value+'-'+document.getElementById('exam_mois#2').value+'-'+document.getElementById('sel_jour#2').value,this.id);">
            	<option>Year</option>
                <?php 
					for ($i = date('Y'); $i >= $limite; $i--)
					{
						echo '<option value='.$i.'>'.$i.'</option>';
					}
				?>
        </select>
      <select name="exam_mois#" id="exam_mois#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#date',document.getElementById('sel_annee#2').value+'-'+this.value+'-'+document.getElementById('sel_jour#2').value,this.id);">
        <option value="00">Month</option>
        <?php
					for($month = 1; $month <= 12; $month++)
					{
						if($month < 10) $month = "0" . $month;
						echo '<option>'.$month.'</option>';
					}
				?>
      </select>
      <select name="sel_jour#2" id="sel_jour#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#date',document.getElementById('sel_annee#2').value+'-'+document.getElementById('exam_mois#2').value+'-'+this.value,this.id);">
        <option value="00">Day</option>
        <?php
					for($day = 1; $day <= 31; $day++)
					{
						if($day < 10) $day = "0" . $day;
						echo '<option>'.$day.'</option>';
					}
				?>
      </select>
      </p>
 
 
  <div>
			<div>
 
          <?php 
		  	if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")
			{
				$sql_snomed = "SELECT * FROM neuro_cerebralanteriority WHERE patient_id = '".$_SESSION['dmu']."' AND position = 2";
				$query_snomed = mysql_query($sql_snomed);
				$snomed = mysql_fetch_array($query_snomed);
			}
		  ?>  
 
         <label for="snomed">SNOMED T</label>
         <select id="sel_snomed_id#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#icdo_id',this.value,this.id);">
            <option value="">------</option>
            <?php 
                $sql = "SELECT * FROM neuro_snomed WHERE Code LIKE '%T%' ORDER BY description "; 
 
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                {
                    echo '<option value="'.$items['ID'].'"';
					if(($_SESSION['MAJ'] == "OK")&&(trim($snomed['icdo_id']) == trim($items['ID']))) echo 'selected="selected"';
					echo '>'.$items['description'].'</option>';
                }
            ?>
        </select>
        <select id="sel_snomed_code#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#icdo_code',this.value,this.id);">
            <option value="">------</option>
            <?php 
                $sql = "SELECT * FROM `neuro_snomed` WHERE `Code` LIKE '%T%'"; 
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                {
                    echo '<option value="'.$items['ID'].'"';
					if( isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] == "OK")&&(trim($snomed['icdo_id']) == trim($items['ID']))) echo 'selected="selected"';
					echo '>'.$items['Code'].'</option>';
                }
            ?>
        </select>
        <br />
        <label for="snomed">SNOMED M</label><select id="sel_snomed_sous_cat_desc#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#ICD0_sous_categorie',this.value,this.id);">
            <option value="">------</option>
            <?php 
                $sql = "SELECT * FROM neuro_snomed WHERE Code LIKE '%M%' ORDER BY description";
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                {
                    echo '<option value="'.$items['ID'].'"';
					if(($_SESSION['MAJ'] == "OK")&&(trim($snomed['ICD0_sous_categorie']) == trim($items['ID']))) echo 'selected="selected"';
					echo '>'.$items['description'].'</option>';
                }
            ?>
        </select>
			<select name="sel_snomed_sous_cat_code#" id="sel_snomed_sous_cat_code#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#ICD0_sous_categorie',this.value,this.id);">
			  <option value="">------</option>
			  <?php 
                $sql = "SELECT * FROM neuro_snomed WHERE Code LIKE '%M%' ORDER BY description"; 
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                {
                    echo '<option value="'.$items['ID'].'"';
					if(( isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&(trim($snomed['ICD0_sous_categorie']) == trim($items['ID']))) echo 'selected="selected"';
					echo '>'.$items['Code'].'</option>';
                }
            ?>
			  </select>
			</div>
 
 
 
 
	</div>
 
 
        </p>
 
        <p><span><img src="images/ajouter.png" id="img_add_place" title="Add a place of surgery" onclick="ajouter_place('place#2');" /></span> Place of surgery 
        	<input type="hidden" id="place_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$items['id'].'"'; else echo 'value=""';?> />
            <?php 
		  	if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")
			{
				$sql_place_id = "SELECT place_id FROM neuro_cerebralanteriority WHERE patient_id = '".$_SESSION['dmu']."'";
				$query_place_id = mysql_query($sql_place_id);
				$place_id = mysql_fetch_array($query_place_id);
			}
		  ?>  
 
      <select id="place#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#place_id',this.value,this.id);">
            	<option value="">---------</option> 
            	<?php 
				$sql = " SELECT * FROM neuro_anteriorityplace ORDER BY name";
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                {
 
					echo '<option value="'.$items['id'].'"';
					if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&(trim($items['id']) == trim($place_id['place_id'])))
					{
						echo ' selected="selected" ';	
					}
					echo '>'.$items['name'].'</option>';
 
                }
            ?>	
          </select> 
        Surgery 
        <input type="hidden" id="sel_cerebral_$surgery_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_cerebral['surgery'].'"'; else echo 'value=""';?> />
 
        <select name="sel_cerebral_$surgery#" id="sel_cerebral_$surgery#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#surgery',this.value,this.id);">
          <option>-----</option>
          <option value="Y" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_cerebral2['surgery']) == 'Y') echo 'selected="selected"'; ?>>YES</option>
          <option value="N" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_cerebral2['surgery']) == 'N') echo 'selected="selected"'; ?>>NO</option>
        </select>
Radiotherapy
<input type="hidden" id="sel_cerebral_radiotherapy_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_cerebral['radiotherapy'].'"'; else echo 'value=""';?> />
        <select id="sel_cerebral_radiotherapy#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#radiotherapy',this.value,this.id);">
              <option>-----</option>
              <option value="Y" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_cerebral2['radiotherapy']) == 'Y') echo 'selected="selected"'; ?>>YES </option>
              <option value="N" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_cerebral2['radiotherapy']) == 'N') echo 'selected="selected"'; ?>>NO</option>
          </select>
 
        Chemotherapy 
          <input type="hidden" id="sel_cerebral_chemotherapy_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_cerebral['chemotherapy'].'"'; else echo 'value=""';?> />
        <select id="sel_cerebral_chemotherapy#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#chemotherapy',this.value,this.id);">
              <option>-----</option>
              <option value="Y" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_cerebral2['chemotherapy']) == 'Y') echo 'selected="selected"'; ?>>YES</option>
              <option value="N" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_cerebral2['chemotherapy']) == 'N') echo 'selected="selected"'; ?>>NO</option>
          </select>
        GAMMA KNIFE : 
          <select id="sel_gamma_knife_cerebral_ant#2" onchange="Enregistrer_cerebral_anteriority('neuro_cerebralanteriority#gamma_knife',this.value,this.id);">
            <option>-----</option>
            <option value="Y" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_cerebral2['gamma_knife']) == 'Y') echo 'selected="selected"'; ?>>YES</option>
            <option value="N" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_cerebral2['gamma_knife']) == 'N') echo 'selected="selected"'; ?>>NO</option>
          </select>
        </p>
</div>
 
    <h3><a href="#">Familial anteriority</a></h3>
    <div>
    	<input type="hidden" id="sel_familial_anteriority_old" <?php if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") echo 'value="'.$data_familial['is_onco'].'"'; else echo 'value=""';?> />
        <select id="sel_familial_anteriority" onchange="Enregistrer_info_on_change('neuro_familialanteriority#is_onco',this.value,this.id);">
                <option>-----</option>
                <option value="Y" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_familial['is_onco']) == 'Y') echo 'selected="selected"'; ?>>YES</option>
                <option value="N" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_familial['is_onco']) == 'N') echo 'selected="selected"'; ?>>NO</option>
            </select>
    </div>
 
    <h3><a href="#">Presurgical symptoms</a></h3>
    <div>
    <!-- <span><img src="images/ajouter.png" id="img_add_place" title="Add a symptom" onclick="ajouter_symptomes('sel_symptoms');" /></span> -->
 
        <select id="sel_symptoms" onchange="activer_input(this.value, document.getElementById('sel_duree_sympt').value, 'btn_ajout_symptome' );">
            	<option value="">---------</option> 
            	<?php 
				$sql = " SELECT * FROM neuro_symptomtype ORDER BY name";
                $query = mysql_query($sql);
                while($items = mysql_fetch_array($query))
                { 
					echo '<option value="'.$items['id'].'"';
					echo '>'.$items['name'].'</option>';
 
                }
            ?>	
            </select>
            <select id="sel_duree_sympt">
            	<option value="">-----</option>
                <option value="1"><= 1 month</option>
                <option value="2">> AND <= 6 months</option>
                <option value="3">> 6 AND <= 12 months</option>
                <option value="4">> 12 months</option>
            </select>
            <input type="button" id="btn_ajout_symptome" value="add this symptom" onclick="Enregistrer_info_on_change_plusieurs('neuro_preoperative_symptoms#numero_symptome#	duree_symptome',document.getElementById('sel_symptoms').value,document.getElementById('sel_duree_sympt').value,this.id);" disabled="disabled" />
 
            <p>
                Karnofsky : <select id="sel_karnofsky" onchange="Enregistrer_info_on_change('neuro_symptoms_clinique#karnofsky_clinique',this.value,this.id);">
                                <option>-----</option>
                                <option value="1" <?php if ((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_symptomes['karnofsky_clinique'] == 1)) echo ' selected="selected"'; ?> >]90 - 100]</option>
                                <option value="2" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_symptomes['karnofsky_clinique'] == 2)) echo ' selected="selected"'; ?>>]70 - 90]</option>
                                <option value="3" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_symptomes['karnofsky_clinique'] == 3)) echo ' selected="selected"'; ?>>]50 - 70]</option>
                                <option value="4" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_symptomes['karnofsky_clinique'] == 4)) echo ' selected="selected"'; ?>>]30 - 50]</option>
                                <option value="5" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_symptomes['karnofsky_clinique'] == 5)) echo ' selected="selected"'; ?>>]10 - 20]</option>
                                <option value="6" <?php if(($_SESSION['MAJ'] == "OK")&&($data_symptomes['karnofsky_clinique'] == 6)) echo ' selected="selected"'; ?>>]0 - 10]</option>
 
                            </select>
            </p>
            <p>PS : <select id="sel_ps" onchange="Enregistrer_info_on_change('neuro_symptoms_clinique#ps',this.value,this.id);">
            			<option>-----</option>
            			<option value="0" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_symptomes['ps'] == 0)) echo ' selected="selected"'; ?>>0</option>
                        <option value="1" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_symptomes['ps'] == 1)) echo ' selected="selected"'; ?>>1</option>
                        <option value="2" <?php if ((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_symptomes['ps'] == 2)) echo ' selected="selected"'; ?>>2</option>
                        <option value="3" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_symptomes['ps'] == 3)) echo ' selected="selected"'; ?>>3</option>
                        <option value="4" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_symptomes['ps'] == 4)) echo ' selected="selected"'; ?>>4</option>
                        <option value="5" <?php if((isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK")&&($data_symptomes['ps'] == 5)) echo ' selected="selected"'; ?>>5</option>
            		</select> 
 
            </p>
 
            <div id="symptomes_patient"></div>
 
 
    </div>
 
 
	<?php $_SESSION['MAJ'] = ""; ?>
__________________
beegees est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2011, 18h47   #6
Expert Confirmé
 
Avatar de RunCodePhp
 
Inscription : janvier 2010
Messages : 2 727
Détails du profil
Informations personnelles :
Localisation : Réunion

Informations forums :
Inscription : janvier 2010
Messages : 2 727
Points : 3 294
Points : 3 294
Salut

C'est impossible, l'élément se trouve bien dans le tableau.
Ce $data doit être modifié en court de route.
Je ne vois pas d'autre explications.

Change le nom du tableau (trop générique d'ailleurs) par $neuro_patient plus explicite ici (voir $truc_muche), sait on jamais.

Fait un essai avec comme clé $truc_muche[6], sait on jamais là aussi.
Même si cela ets théoriquement inutile, tu peux toujours initialiser le tableau juste avant le fetch() :
Code :
1
2
3
4
$truc_muche = array();
$truc_muche = $sql_check->fetch();
... plus loin ...
... echo 'value="'.$truc_muche['dmu_number'].'"'; ...
__________________
Win XP | WampServer 2.2d | Apache 2.2.21 | Php 5.3.10 | MySQL 5.5.20
Si debugger, c'est supprimer des bugs, alors programmer ne peut être que les ajouter [Edsger Dijkstra]
RunCodePhp est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 26/11/2011, 18h48   #7
Membre Expert
 
Avatar de beegees
 
Homme David Vincent (l'homme qui a vu les extra-terrestres)
Développeur Web
Inscription : mars 2004
Messages : 3 240
Détails du profil
Informations personnelles :
Nom : Homme David Vincent (l'homme qui a vu les extra-terrestres)
Âge : 37
Localisation : Belgique

Informations professionnelles :
Activité : Développeur Web
Secteur : Enseignement

Informations forums :
Inscription : mars 2004
Messages : 3 240
Points : 1 048
Points : 1 048
Salut RunCodePHP,

Merci pour ta réponse.

En fait, tu as raison, j'affectais à $data des autres valeurs en cours de chemin.

Cela posait problème

Merci encore pour ton aide.

beegees
__________________
beegees est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2011, 18h49   #8
Expert Confirmé
 
Avatar de rawsrc
 
Homme Martin
Dev indep
Inscription : mars 2004
Messages : 1 462
Détails du profil
Informations personnelles :
Nom : Homme Martin
Âge : 35
Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

Informations professionnelles :
Activité : Dev indep

Informations forums :
Inscription : mars 2004
Messages : 1 462
Points : 2 552
Points : 2 552
Envoyer un message via Skype™ à rawsrc
Bon là ça semble clair : dans ton script tu fais appel à $data directement en ligne 13 mais où est-ce-que tu définis cette variable ?

Ensuite je te conseillerai de rajouter dans ton script ceci :
Code :
$maj = (isset($_SESSION['MAJ']) && ($_SESSION['MAJ'] === "OK"));
et de remplacer partout if(isset($_SESSION['MAJ']) && $_SESSION['MAJ'] == "OK") par if ($maj)...Tu y gagneras en lisibilité
__________________
# Dans la Création, tout est permis mais tout n'est pas utile...
rawsrc est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2011, 18h53   #9
Expert Confirmé
 
Avatar de RunCodePhp
 
Inscription : janvier 2010
Messages : 2 727
Détails du profil
Informations personnelles :
Localisation : Réunion

Informations forums :
Inscription : janvier 2010
Messages : 2 727
Points : 3 294
Points : 3 294
Citation:
... j'affectais à $data des autres valeurs en cours de chemin.
Faut éviter les $data, $array, et autre $var1, $var2, ... qui de toute manière rend illisible le code à la longue.

Et ça évite ce genre d'erreur, en plus.
Bref ... faut mettre des nom explicitent
(j'le fais pas toujours non plus )
__________________
Win XP | WampServer 2.2d | Apache 2.2.21 | Php 5.3.10 | MySQL 5.5.20
Si debugger, c'est supprimer des bugs, alors programmer ne peut être que les ajouter [Edsger Dijkstra]
RunCodePhp est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 07h38.


 
 
 
 
Partenaires

Hébergement Web