Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problem ze zmienna $_POST
przemko77
post
Post #1





Grupa: Zarejestrowani
Postów: 34
Pomógł: 0
Dołączył: 27.07.2005
Skąd: Jarocin

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


  1. <?
  2.  
  3.  $zamfirm = stripslashes(trim($_POST[&#092;"firma\"]));
  4.  $zamimnaz = stripslashes(trim($_POST[&#092;"imnaz\"]));
  5.  $zamadres = stripslashes(trim($_POST[&#092;"adres\"]));
  6.  $zamnip = stripslashes(trim($_POST[&#092;"nip\"]));
  7.  $zamid = stripslashes(trim($_POST[&#092;"idpr\"]));
  8.  $zamtel = stripslashes(trim($_POST[&#092;"tel\"]));
  9.  $zamfirm2 = stripslashes(trim($_POST[&#092;"firma2\"]));
  10.  $zamimnaz2 = stripslashes(trim($_POST[&#092;"imnaz2\"]));
  11.  $zamadres2 = stripslashes(trim($_POST[&#092;"adres2\"]));
  12.  $zamtowar = stripslashes(trim($_POST{$kosz[&#092;"towar\"]}));
  13.  $zamcena = stripslashes(trim($_POST{$kosz[&#092;"cena\"]}));
  14.  $zamile = stripslashes(trim($_POST{$kosz[&#092;"ile\"]}));
  15.  $zamlacznie = stripslashes(trim($_POST[&#092;"lacznie\"]));
  16.  
  17.  if (count($_SESSION[&#092;"koszyk\"])>0) {
  18. echo &#092;"<table width=\"650\" align=\"center\" border=\"1\">
  19.  
  20. <tr><th align=&#092;"center\" width=\"280\">Produkty</th><th align=\"center\" width=\"80\">Cena</th><th width=\"35\">Sztuk</th><th width=\"80\" align=\"center\">Warto&para;ć</th></tr>\";
  21.  
  22. foreach($_SESSION[&#092;"koszyk\"] as $indeks=>$kosz) {
  23. echo &#092;"<tr>\";
  24. echo &#092;"<td>{$kosz[\"towar\"]}</td>\";
  25. echo &#092;"<td align=\"right\">{$kosz[\"cena\"]} zł</td><td>{$kosz[\"ile\"]}</td>\";
  26. echo &#092;"<td align=\"right\">\".number_format($kosz[\"cena\"]*$kosz[\"ile\"],2,\".\",\"\");
  27. echo &#092;" zł</td>\";
  28. echo &#092;"</tr>\";
  29. $lacznie +=$kosz[&#092;"cena\"]*$kosz[\"ile\"];
  30. }
  31. echo &#092;"<tr><td colspan=\"3\" align=\"right\">
  32. Razem: </td><td align=&#092;"right\">\";
  33. echo number_format($lacznie,2,&#092;".\",\"\").\" zł</td></tr></table><br>\";
  34. echo &#092;"<input type=\"hidden\" name=\"id1\" value=\"$lacznie\">\";
  35.  
  36. echo &#092;"<center>Dane zamawiaj&plusmn;cego</center><br>
  37. <form action=&#092;"realizuj.php\" method=\"post\">
  38. <table align=&#092;"center\" border=\"1\" ><tr><td>
  39.  Nazwa firmy:</td><td><input type=&#092;"text\" name=\"firma\"></td>
  40. </td></tr>
  41. <tr><td>
  42.  Imię i nazwisko:</td><td><input type=&#092;"text\" name=\"imnaz\"></td>
  43. </td></tr>
  44. <tr><td>
  45.  Adres:</td><td><input type=&#092;"text\" name=\"adres\"></td>
  46. </td></tr>
  47. <tr><td>
  48.  NIP:</td><td><input type=&#092;"text\" name=\"nip\"></td>
  49. </td></tr>
  50. <tr><td>
  51.  ID:</td><td><input type=&#092;"text\" name=\"idpr\"></td>
  52. </td></tr>
  53. <tr><td>
  54.  Telefon:</td><td><input type=&#092;"text\" name=\"tel\"></td>
  55. </td></tr>
  56. </table><br>
  57. <center>Adres do wysyłki towaru</center>
  58. <br><table align=&#092;"center\" border=\"1\" ><tr><td>
  59.  Nazwa firmy:</td><td><input type=&#092;"text\" name=\"firma2\"></td>
  60. </td></tr>
  61. <tr><td>
  62.  Imię i nazwisko:</td><td><input type=&#092;"text\" name=\"imnaz2\"></td>
  63. </td></tr>
  64. <tr><td>
  65.  Adres:</td><td><input type=&#092;"text\" name=\"adres2\"></td>
  66. </td><td colspan=&#092;"2\"><input type=\"submit\" value=\"Wyslij\"></td></tr>
  67. </table></form>
  68. &#092;";
  69.  
  70. if (strlen($zamimnaz)>5) {
  71. $list = &#092;"Dane zamawiaj&plusmn;cego: n FIRMA- $zamfirm IMI i NAZWISKO- $zamimnaz ADRES- $zamadres NIP- $zamnip ID- $zamidpr TELEFON- $zamtel n Dane do wysyłki: n FIRMA- $zamfirm2 IMI i NAZWISKO- $zamimnaz2 ADRES- $zamadres2 n $zamtowar $zamcena  $zamile $lacznie\";
  72. mail(&#092;"adres@com.pl\",\"Zamówienie\", $list, \"From: $zamimnaz <$zamadres>\"); 
  73. echo &#092;"List został wysłany, dziekujemy...\";
  74. } 
  75.  
  76. echo &#092;"<br><center><a id=\"inne3\" href=\"jakzamawia.php\">Wróć do produktów</a></center>\";
  77. } else echo &#092;"<p id=\"pduze\">Koszyk jest pusty</p><center><a id=\"inne3\" href=\"jakzamawia.php\">Wróć do produktów</a></center>\";
  78. ?>


jak w tym pliku podstawic pod zmienna $_POST zawartosc koszyka aby wszystko zostalo wyslane na adres mail? prosze o pomoc
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 - 06:30