Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1.  
  2.  
  3. <?php
  4.  
  5.  
  6. if (!empty($_GET['nazw']))
  7. {
  8. $nazw=$_GET['nazw'];
  9. }
  10.  
  11.  
  12.  
  13.  
  14.  
  15. if (!empty($_GET['imie']))
  16. {
  17. $imie=$_GET['imie'];
  18. }
  19.  
  20.  
  21. setcookie('nazw',$nazw);
  22. setcookie('imie',$imie);
  23.  
  24.  
  25.  
  26. print '
  27. <form action="liczba.php" method="get">
  28. Nazwisko: <input type="text" name="nazw" value="nazw">
  29. Imię: <input type="text" name="imie" value="imie">
  30. <input type="submit">
  31. </form>
  32. ';
  33.  
  34.  
  35. print("Wpisana wartość to:" .$_COOKIE['nazw']. " " .$_COOKIE['imie']);
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement