Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> nie dzialajaca klasa
miszqa
post
Post #1





Grupa: Zarejestrowani
Postów: 168
Pomógł: 0
Dołączył: 15.01.2004
Skąd: Suwalki/Poznan

Ostrzeżenie: (10%)
X----


Mam problem
chcialbym uzyc klasy w postaci dodawania newsa do bazy ale nie wiem czemu nie dziala klasa ma postac
  1. <?
  2. class przyklad
  3. {
  4. function dodaj($dbname)
  5.     {
  6.     if(isset($submit)):
  7.                 $data=date('Y-m-d');
  8.                 $sql = &#092;"INSERT INTO newsy VALUES (null, '$naglowek', '$tresc', '$data', '$kategoria_id')\";
  9.                 mysql_query($sql);
  10.                 print &#092;"<center><h3>Wiadomoœ&aelig; zostala dopisana</h3></center>\";
  11.             endif;
  12.             ?>
  13.             <table width=\"600\" align=\"center\" border=1>
  14.                 <tr><td><center><h3>Dopisz wiadomosc do bazy danych</h3></center></td></tr>
  15.                 <tr bgcolor=\"dddddd\"><td><center>Tytul:</center></td></tr>
  16.                 <tr><td><center><input type=\"text\" size=\"90\" name=\"naglowek\"></center></td></tr>
  17.                 <tr bgcolor=\"dddddd\"><td><center>Tresc:</center></td></tr>
  18.                 <tr><td><center><textarea name=\"tresc\" cols=\"70\" rows=\"10\" wrap=\"VIRTUAL\"></textarea></center></td></tr>
  19.             </table>
  20.             <center><input type=\"submit\" name=\"submit\" value=\"submit\"><input type=\"reset\" value=\"reset\"></center>
  21.             <?
  22.     }
  23.  
  24.  
  25.  
  26. }
  27. ?>

tzn chodzi o to ze wyswietlac wyswietla sie dobrze ale nie dodaje wiadomosci

Ten post edytował miszqa 10.07.2004, 00:31:23
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 - 20:11