Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
  2.  
  3. <?php $sports = array("Basketball", "Football", "Handball");?>
  4.  
  5. <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
  6. <input type="hidden" name="serializedData" value="<?php echo serialize($sports);?>">
  7. <input type="submit" name="okButton" value="OK"><br>
  8. </form>
  9.  
  10. if(isset($_POST['okButton'])) {
  11. $sports_new = unserialize($_POST['serializedData']);
  12.  
  13. // Show array
  14. for($i = 0; $i < count($sports_new); $i++) {
  15. print $sports_new[$i]."<br/>";
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement