Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Przesylanie formularz do pdf-u, Przesylanie formularz do pdf-u
mikess
post 15.12.2005, 18:46:51
Post #1





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 24.11.2005

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


Mam problem gdy przesylam posty z formularza do pliku ktory generuje pdfa skrypt nie widzi zmiennych $_POST gdy przesylalem Get-em dziala ale przeciez nie wysle kliku zdan z textarea Get-em bo to troche bezsensu. Kozystam z FPDF. Co moge zrobic by to dzialalo ?
Go to the top of the page
+Quote Post
bregovic
post 15.12.2005, 19:01:59
Post #2





Grupa: Zarejestrowani
Postów: 562
Pomógł: 15
Dołączył: 8.08.2003
Skąd: Denmark/Odense

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


Forumowa wróżka Roksana jest wciąż na urlopie - i niestety nie zosatawiła instrukcji użycia szklanej kuli. Pokaż nam kod abyśmy mogli tobie pomóc...


--------------------
Prank - for the fun. Mac - for the simplicity. Deviantart - for the kick.
Life is ours, We live it our way -- Metallica
Go to the top of the page
+Quote Post
mikess
post 15.12.2005, 20:44:12
Post #3





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 24.11.2005

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


...
<form action="plik.php" method="post">
Temat<input type="text" name="temat">
Tresc<textarea name="tresc"></textarea>
<input type="submit" value="wysli">
</form>
....

plik.php
  1. <?
  2. require('fpdf.php');
  3. $pdf=new FPDF('P','cm','A4');
  4. $pdf->AddPage();
  5. $pdf->AddFont('arial','','arial.php');
  6. $pdf->SetFont('arial','','8');
  7. $pdf->Cell(0,1,$_POST['temat'],0,1,'L');
  8. $pdf->Cell(0,1,$_POST['tresc'],0,1,'L');
  9. $pdf->output();
  10. ?> 


po przeslaniu formularza zmienne $_POST sa puste


oki juz sie sprawa wyjasnila po prostu nie mozna stosowac sesji w takich plikach bo sie nie chce otworzyc pdf za pierszym razem i trzeba oswiezyc strone a po odswiezeniu skrypt generujacy pdf traci zmienne POST
Dzieki za zainteresowanie

Ten post edytował mikess 15.12.2005, 21:37:00
Go to the top of the page
+Quote Post
FiDO
post 15.12.2005, 21:57:06
Post #4





Grupa: Przyjaciele php.pl
Postów: 1 717
Pomógł: 0
Dołączył: 12.06.2002
Skąd: Wolsztyn..... Studia: Zielona Góra

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


zobacz co zwraca

  1. <?php
  2.  
  3. var_dump($_POST);
  4. var_dump($HTTP_POST_VARS);
  5.  
  6. ?>


Jaka masz wersje php ?


--------------------
Brak czasu :/
Go to the top of the page
+Quote Post
mikess
post 16.12.2005, 17:57:24
Post #5





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 24.11.2005

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


gdy wrzucilem

  1. <?php
  2.  
  3. var_dump($_POST);
  4. var_dump($HTTP_POST_VARS);
  5.  
  6. ?>


do skryptu ktory generuje pdfa to wyrzuca mi warniga Cannot modify header information i error FPDF error: Some data has already been output to browser, can't send PDF file

a wersja php to 5.0.3
Go to the top of the page
+Quote Post
itsme
post 16.12.2005, 22:10:35
Post #6





Grupa: Zarząd
Postów: 1 512
Pomógł: 2
Dołączył: 22.04.2002
Skąd: Koszalin




wlasnie po to kazano CI zrobic var_dumpa :-)
http://pl2.php.net/manual/en/function.var-dump.php
nastepnie pokaz nam to co Ci on wyswietlil a musial koniecznie pokazac jakies dane :-)


--------------------
brak sygnaturki rowniez jest sygnaturką
Go to the top of the page
+Quote Post
mikess
post 18.12.2005, 13:42:15
Post #7





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 24.11.2005

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


var_dump wyrzucil mi cos takiego

array(7) { ["Nr_dow_os"]=> string(8) "aaaaaaaa" ["Rozpoznanie"]=> string(14) "aaaaaaaaaaaaaa" ["Cel"]=> string(13) "aaaaaaaaaaaaa" ["Imie"]=> string(6) "Alicja" ["Nazwisko"]=> string(5) "Kowal" ["Data_ur"]=> string(9) "06-8-1981" ["Adres"]=> string(33) "ul.Kolorowa 9 m 56" } array(7) { ["Nr_dow_os"]=> string(8) "aaaaaaaa" ["Rozpoznanie"]=> string(14) "aaaaaaaaaaaaaa" ["Cel"]=> string(13) "aaaaaaaaaaaaa" ["Imie"]=> string(6) "Alicja" ["Nazwisko"]=> string(5) "Kowal" ["Data_ur"]=> string(9) "06-8-1981" ["Adres"]=> string(33) "ul.Kolorowa 9 m 56" }

Warning: Cannot modify header information - headers already sent by (output started at /home/abc/public_html//test.php:3) in /home/abc/public_html/fpdf/fpdf.php on line 1022
FPDF error: Some data has already been output to browser, can't send PDF file

teraz juz wszystko dziala oki pdf jest generowany ale nie wiem czemu po odswiezeniu strony z pdf-em zmienne POST sie czyszcza
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 Wersja Lo-Fi Aktualny czas: 12.07.2025 - 15:01