Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [html+php] Forum bez bazy danych i problem z zapisaniem do pliku
benokogel
post
Post #1





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 18.05.2007
Skąd: Łowicz

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


Witam wszystkich.
Mam taki "mały" problem (od razu nadmienie że z php jestem zielony) potrzebuje forum do strony ale musi zapisywać dane do pliku bez użycia bazy danych

znalazłem w sieci takie proste forum - składa się z 3 plików ale nie chce zapiywać ani wyświetlać wprowadzonych danych do formularza

mam nadzieje że nie będziecie krzyczeć ale umieszcze kodu wszystkich tych plików

plik: forum.html

  1. <?php
  2.  
  3. <head>
  4. <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
  5. <meta name="generator" content="">
  6. <title>PHP4 Input Script</title>
  7. </head>
  8.  
  9. <body>
  10. <h3>
  11. <table cool width="566" height="716" border="0" cellpadding="0" cellspacing="0" gridx="16" showgridx usegridx gridy="16" showgridy usegridy>
  12. <tr height="16">
  13. <td width="1" height="16"><spacer type="block" width="1" height="16"></td>
  14. <td width="48" height="16" colspan="1" rowspan="1" valign="top" align="left" xpos="0">
  15. <form name="Forum" action="post.php" method="post" enctype="application/x-www-form-urlencoded">
  16. </td>
  17. </tr>
  18. <tr height="64">
  19. <td width="1" height="64"><spacer type="block" width="1" height="64"></td>
  20. <td width="48" height="64"></td>
  21. <td width="32" height="64"></td>
  22. <td width="16" height="64"></td>
  23. <td width="16" height="64"></td>
  24. <td width="16" height="64"></td>
  25. <td width="240" height="64" colspan="5" rowspan="1" valign="top" align="left" xpos="128" content csheight="32">
  26. <h3>Forum: title goes here</h3>
  27. </td>
  28. <td width="176" height="64"></td>
  29. <td width="21" height="64"></td>
  30. </tr>
  31. <tr height="32">
  32. <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
  33. <td width="48" height="32"></td>
  34. <td width="496" height="32" colspan="10" rowspan="1" valign="top" align="left" xpos="48">
  35. <hr size="15" width="384" color="9999cc" height="45">
  36. </td>
  37. <td width="21" height="32"></td>
  38. </tr>
  39. <tr height="48">
  40. <td width="1" height="48"><spacer type="block" width="1" height="48"></td>
  41. <td width="48" height="48"></td>
  42. <td width="32" height="48"></td>
  43. <td width="16" height="48"></td>
  44. <td width="48" height="48" colspan="4" rowspan="1" valign="top" align="left" xpos="96" content csheight="32">Name:</td>
  45. <td width="224" height="48" colspan="3" rowspan="1" valign="top" align="left" xpos="144"><input type="text" name="name" size="24"></td>
  46. <td width="176" height="48"></td>
  47. <td width="21" height="48"></td>
  48. </tr>
  49. <tr height="32">
  50. <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
  51. <td width="48" height="32"></td>
  52. <td width="32" height="32"></td>
  53. <td width="16" height="32"></td>
  54. <td width="46" height="32" colspan="3" rowspan="1" valign="top" align="left" xpos="96" content csheight="32">Topic:</td>
  55. <td width="2" height="32"></td>
  56. <td width="224" height="32" colspan="3" rowspan="1" valign="top" align="left" xpos="144"><input type="text" name="topic" size="24"></td>
  57. <td width="176" height="32"></td>
  58. <td width="21" height="32"></td>
  59. </tr>
  60. <tr height="32">
  61. <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
  62. <td width="48" height="32"></td>
  63. <td width="496" height="32" colspan="10" rowspan="1" valign="top" align="left" xpos="48">
  64. <hr size="15" width="384" color="9999cc" height="45">
  65. </td>
  66. <td width="21" height="32"></td>
  67. </tr>
  68. <tr height="29">
  69. <td width="1" height="29"><spacer type="block" width="1" height="29"></td>
  70. <td width="48" height="29"></td>
  71. <td width="32" height="29"></td>
  72. <td width="65" height="29" colspan="6" rowspan="1" valign="top" align="left" xpos="80" content csheight="29">Message:</td>
  73. <td width="143" height="29"></td>
  74. <td width="80" height="29"></td>
  75. <td width="176" height="29"></td>
  76. <td width="21" height="29"></td>
  77. </tr>
  78. <tr height="243">
  79. <td width="1" height="243"><spacer type="block" width="1" height="243"></td>
  80. <td width="48" height="243"></td>
  81. <td width="32" height="243"></td>
  82. <td width="464" height="243" colspan="9" rowspan="1" valign="top" align="left" xpos="80"><textarea name="message" cols="40" rows="13" wrap="virtual"></textarea></td>
  83. <td width="21" height="243"></td>
  84. </tr>
  85. <tr height="48">
  86. <td width="1" height="48"><spacer type="block" width="1" height="48"></td>
  87. <td width="48" height="48"></td>
  88. <td width="496" height="48" colspan="10" rowspan="1" valign="top" align="left" xpos="48">
  89. <hr size="15" width="384" color="9999cc" height="45">
  90. </td>
  91. <td width="21" height="48"></td>
  92. </tr>
  93. <tr height="157">
  94. <td width="1" height="157"><spacer type="block" width="1" height="157"></td>
  95. <td width="48" height="157"></td>
  96. <td width="32" height="157"></td>
  97. <td width="16" height="157"></td>
  98. <td width="16" height="157"></td>
  99. <td width="176" height="157" colspan="5" rowspan="1" valign="top" align="left" xpos="112"><input type="reset" value="Clear"></td>
  100. <td width="80" height="157" colspan="1" rowspan="1" valign="top" align="left" xpos="288"><input type="submit" value="Post" name="submitButtonName"></td>
  101. <td width="176" height="157"></td>
  102. <td width="21" height="157"></td>
  103. </tr>
  104. <tr height="14">
  105. <td width="1" height="14"><spacer type="block" width="1" height="14"></td>
  106.  
  107. <td width="21" height="14" colspan="1" rowspan="1" valign="top" align="left" xpos="544">
  108. </form>
  109. </td>
  110. </tr>
  111. </table>


[+] edit
Post został zmodyfikowany ze względu
na rozjechanie nim tej części forum.
---
~strife
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
strife
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 2 605
Pomógł: 96
Dołączył: 22.10.2004
Skąd: UK

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


Cytat
mam nadzieje że nie będziecie krzyczeć ale umieszcze kodu wszystkich tych plików


Ja będę krzyczał, następnym razem gdy będziesz chciał na forum wrzucić dużą ilośc kodu to użyj do tego phpfi.com ponieważ Twój post doprowadził do rozjechania forum w tej części. Jak już to zrobisz będziemy mogli Ci więcej pomóc.
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: 23.08.2025 - 01:00