Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Cookies
piotr.kolodziej
post
Post #1





Grupa: Zarejestrowani
Postów: 17
Pomógł: 0
Dołączył: 23.09.2004

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


mam prosbe, niech ktos powie czemu mi do cookies nie podaje wartosci lub nie wypisuje
  1. <html>
  2. <?php  if($set_type) setcookie(&#092;"font[type]\", $set_type, time()+3600);
  3.  if($set_size) setcookie(&#092;"font[size]\", $set_size, time()+3600);
  4. ?>
  5. <head>
  6. <title>Untitled Document</title>
  7. <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
  8. </head>
  9. <body><DIV ALIGN = 'center'>
  10. <?php
  11. $type = array(&#092;"Arial\", \"sens-serif\", \"helvetica\");
  12. $size = array(&#092;"1\", \"2\", \"3\", \"8\", \"10\", \"12\");
  13.  
  14.  
  15. echo &#092;"<FORM method=post NAME='index.php'>\";
  16. echo &#092;"Jaka czcionka?\";
  17. echo &#092;"<SELECT NAME='set_type'>\";
  18. echo &#092;"<OPTION SELECTED VALUE=''>domyslna</OPTION>\";
  19. foreach($type as $var)
  20. echo &#092;"<OPTION>$var</OPTION>\";
  21. echo &#092;"</SELECT><BR><BR>\";
  22.  
  23.  echo &#092;"Jaki rozmiar?\";
  24. echo &#092;"<SELECT NAME='set_size'>\";
  25. echo &#092;"<OPTION SELECTED VALUE=''>domyslna</OPTION>\";
  26. foreach($size as $var)
  27. echo &#092;"<OPTION>$var</OPTION>\";
  28. echo &#092;"</SELECT><BR><BR>\";
  29.  
  30. echo &#092;"<INPUT TYPE=SUBMIT><BR><BR>\";
  31. echo &#092;"</FORM>\";
  32.  
  33. echo &#092;"wybrana czcionka: \".$_POST['set_type'].\"<BR><BR>\";
  34. echo &#092;"wybrana wielkosc: \".$_POST['set_size'].\"<BR><BR>\";
  35.  
  36. echo $font[type];
  37. echo $font[size];
  38. echo $_COOKIE[&#092;"font[type]\"];
  39. echo $_COOKIE[&#092;"font[size]\"];
  40. ?>
  41. </body>
  42. <html>
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: 3.10.2025 - 04:21