Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]blad w skrypcie na srednia
Amarant90
post
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 21.09.2013

Ostrzeżenie: (0%)
-----


  1. <?php
  2. if (!$T1 && !$T2&&.......)
  3. {
  4.  
  5. print '<form method="POST" >';
  6. print '<table border="1" width="100%">';
  7. print '<tr>';
  8. print '<td colspan="2" bgcolor="#d65d55">';
  9. print '<p align="center"><font face="Verdana">KALKULATOR OCENY</font></td>';
  10. print '</tr>';
  11. print '<tr>';
  12. print '<td width="48%"><font face="Verdana" size="2">J. polski</font></td>';
  13. print '<td width="50%"><input type="text" name="T1" size="37"></td>';
  14. print '</tr>';
  15. print '<tr>';
  16. print '<td width="48%"><font face="Verdana" size="2">J. angielski</font></td>';
  17. print '<td width="50%"><input type="text" name="T2" size="37"></td>';
  18. print '</tr>';
  19. print '<tr>';
  20. print '<td width="48%" ><font face="Verdana" size="2">Historia</font></td>';
  21. print '<td width="50%" height="29"><input type="text" name="T3" size="37"></td>';
  22. print '</tr>';
  23. print '<tr>';
  24. print '<td width="48%"><font face="Verdana" size="2">Matematyka</font></td>';
  25. print '<td width="50%"><input type="text" name="T4" size="37"></td>';
  26. print '</tr>';
  27. print '<tr>';
  28. print '<td width="48%"><font face="Verdana" size="2">Geografia</font></td>';
  29. print '<td width="50%"><input type="text" name="T5" size="37"></td>';
  30. print '</tr>';
  31. print '<tr>';
  32. print '<td width="48%" ><font face="Verdana" size="2">Biologia</font></td>';
  33. print '<td width="50%" height="24"><input type="text" name="T6" size="37"></td>';
  34. print '</tr>';
  35. print '<tr>';
  36. print '<td width="48%"><font face="Verdana" size="2">Chemia</font></td>';
  37. print '<td width="50%" height="6"><input type="text" name="T7" size="37"></td>';
  38. print '</tr>';
  39. print '<tr>';
  40. print '<td width="48%" height="2"><font face="Verdana" size="2">Fizyka z
  41. astronomią</font></td>';
  42. print '<td width="50%" height="2"><input type="text" name="T8" size="37"></td>';
  43. print '</tr>';
  44. print '<tr>';
  45. print '<td width="48%" height="5"><font face="Verdana" size="2">Technologia
  46. informacyjna</font></td>';
  47. print '<td width="50%" height="5"><input type="text" name="T9" size="37"></td>';
  48. print '</tr>';
  49. print '<tr>';
  50. print '<td width="48%" height="23"><font face="Verdana" size="2">Wychowanie
  51. fizyczne</font></td>';
  52. print '<td width="50%" height="23"><input type="text" name="T10" size="37"></td>';
  53. print '</tr>';
  54. print '</table>';
  55. echo '<p align="center"><input type="submit" value="Oblicz" name="licz"></p>';
  56. echo '</form>';
  57. }
  58. else
  59. {
  60. $suma=$T1+$T2+$T3+$T4+$T5+$T6+$T7+$T8+$T9+$T10;
  61. $srednia=$suma/10;
  62. echo "Średnia wynosi $srednia";
  63. ?>


Mam taki kodzik, jednak nie wiem czemu nie chce zadziałać

Ten post edytował Amarant90 21.09.2013, 15:59:12
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
fate
post
Post #2





Grupa: Zarejestrowani
Postów: 824
Pomógł: 106
Dołączył: 14.03.2012
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


po prostu wstaw, sprawdź tylko sciezke i nazwe pliku fROmularz.php
zobacz jeszcze ile masz tam narojone znacznikow <html> niedomkniecia nie po kolei itd
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 22:41