Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> formularz-pole text i file
fusilis
post
Post #1





Grupa: Zarejestrowani
Postów: 24
Pomógł: 0
Dołączył: 19.07.2005

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


Ponizej moj kod, mam problem jak za pomoca jednego buttona wyslac dane do bazy i jednoczesnie przeslac plik, zeby to chodzilo jako jedna forma ? jak polaczyc te dwa kody jednym buttonem. Z gory dzieki za pomoc

  1. <?php
  2. <form action=send1.php method=post>
  3. Podaj Id : <input type=text name=&#092;"id\" size=\"1\"><BR>
  4. Podaj autora : <input type=text name=&#092;"autor\" size=\"60\"><BR>
  5. Podaj tytul : <input type=text name=&#092;"tytul\" size=\"62\"><BR>
  6. Podaj wydawce : <input type=text name=&#092;"wydawca\" size=\"57\"><BR>
  7. <input type=&#092;"submit\" type=\"submit\" value=DOPISZ>
  8. </form>
  9.  
  10. <form action=&#092;"send2.php\" 
  11. method=&#092;"post\" enctype=\"multipart/form-data\">
  12. Wyslij plik: <input type=&#092;"file\" name=\"thefile\"><BR>
  13. <input type=&#092;"submit\" type=\"submit\" value=DOPISZ>
  14. </form>
  15. ?>
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
maker
post
Post #2





Grupa: Zarejestrowani
Postów: 50
Pomógł: 0
Dołączył: 17.09.2004

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


  1. <?php
  2. <form action=\"\" method=\"post\" enctype=\"multipart/form-data\">
  3. Podaj Id : <input type=text name=\"id\" size=\"1\"><BR>
  4. Podaj autora : <input type=\"text\" name=\"autor\" size=\"60\"><BR>
  5. Podaj tytul : <input type=\"text\" name=\"tytul\" size=\"62\"><BR>
  6. Podaj wydawce : <input type=\"text\" name=\"wydawca\" size=\"57\"><BR>
  7. Wyslij plik: <input type=\"file\" name=\"thefile\"><BR>
  8. <input type=\"submit\" type=\"submit\" value=DOPISZ>
  9. </form>
  10. <pre>
  11. ';
  12. echo'$_POST';
  13. print_r($_POST);
  14. echo'$_FILES';
  15. print_r($_FILES);
  16. echo'</pre>';
  17. ?>
Kod
$_POST
Array
(
    [id] => 1
    [autor] => 2
    [tytul] => 3
    [wydawca] => 4
)
$_FILES
Array
(
    [thefile] => Array
        (
            [name] => Serial.txt
            [type] => application/octet-stream
            [tmp_name] => C:\WINDOWS\TEMP\php9E8.tmp
            [error] => 0
            [size] => 31
        )

)


Ten post edytował maker 26.07.2005, 20:55:44


--------------------
My Webpage
Go to the top of the page
+Quote Post
fusilis
post
Post #3





Grupa: Zarejestrowani
Postów: 24
Pomógł: 0
Dołączył: 19.07.2005

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


sory,ale nierozumie,moge prosic o male wyjasnionko ...
Go to the top of the page
+Quote Post
kyno
post
Post #4





Grupa: Przyjaciele php.pl
Postów: 121
Pomógł: 1
Dołączył: 4.01.2004
Skąd: Jawor

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


Połącz to w jeden formularz a dane odbierz odpowiednimi tablicami smile.gif


--------------------
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 20.08.2025 - 04:50