Bonjour,
Alors voila, ce qu'on cherche c'est relié les menu deroulant au fichier texte de manière se que ca nous donne la hauteur d'eau (les valeur dans le tableau.
Voici le contenu des fichiers :
maree.csv :
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 " 0h 1h 2h 3h 4h 5h 6h 7h 8h 9h 10h 11h 12h 13h 14h 15h 16h 17h 18h 19h 20h 21h 22h 23h" "*lun 1 363 301 255 242 278 351 438 515 565 578 546 480 401 328 269 235 250 309 389 467 522 547 532 483" " mar 2 418 355 303 266 264 306 375 450 512 551 555 520 458 389 327 275 251 273 330 401 467 513 532 516" " mer 3 470 413 360 311 278 279 319 381 447 503 538 541 509 452 391 332 282 261 281 334 399 459 505 526" " jeu 4 515 475 422 369 318 282 280 315 373 437 494 533 542 514 461 399 337 283 258 273 323 388 453 506" " ven 5 536 531 493 438 378 318 273 263 295 356 426 493 543 559 534 477 408 336 273 239 251 304 378 455" " sam 6 522 562 561 519 453 379 305 249 232 266 337 421 503 565 589 562 495 412 327 252 208 220 284 374" " dim 7 468 551 600 598 544 462 370 281 213 192 235 322 425 524 599 625 590 508 409 308 220 170 189 270" "*lun 8 380 494 589 643 634 563 462 352 248 169 150 208 315 438 554 636 661 612 513 396 281 183 133 165" " mar 9 266 397 528 632 684 662 572 453 326 210 126 116 192 317 459 586 672 688 622 507 376 250 146 103" " mer 10 154 275 422 565 672 717 677 570 435 297 173 90 94 189 330 485 617 699 700 618 491 351 220 117" " jeu 11 87 158 294 453 600 702 734 676 556 412 269 143 68 91 200 352 512 640 711 695 600 465 324 195" " ven 12 100 89 177 322 485 626 717 732 659 531 386 246 126 66 106 225 381 534 651 705 673 570 435 301" " sam 13 181 101 109 208 356 512 640 714 710 628 500 362 233 126 85 139 261 411 549 646 681 636 531 406" " dim 14 285 180 119 144 247 389 530 636 691 673 587 466 344 232 143 121 183 301 435 551 627 645 593 493" "*lun 15 383 281 193 151 187 288 416 533 617 654 627 545 439 337 244 173 165 229 336 449 540 597 604 551" " mar 16 464 373 289 218 189 229 321 429 522 587 611 583 510 423 341 265 209 208 267 357 449 521 566 568"
tp_texte2.php :
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 <html> <head> <title> Horaires des marées </title> </head> <body> <?php $idf = fopen("maree.csv" , "r" ); echo "Jour"; echo "<select name=\"menujour\" onchange=\"menuderoulant(this)\">"; while(!feof($idf)) { $data = fgets($idf); $jour = explode("\t",$data); echo "<option value==$jours>".$jour[0]."</option>"; } echo "</select>"; fseek($idf,0); echo "Heure"; echo "<select name=\"menuheure\" onchange=\"menuderoulant(this)\">"; $data = fgets($idf); $heure = explode("\t",$data); for($i=0; $i < count($heure); $i++) { echo "<option>".$heure[$i]."</option>"; } echo "</select>"; fseek($idf,0); echo "Minute"; echo "<select name=\"menuheure\" onchange=\"menuderoulant(this)\">"; $data = fgets($idf); $minute = explode("\t",$data); echo "<form name='form 1' method='POST' action='fichiertext.php'>"; echo "<input type='submit'value='OK'><br>"; fclose($idf); ?> Hauteur d'eau : <input type ="text" name="nom"> </body> </html>
Cordialement,
Pierre
Partager