Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. <label> ID: </label><input type="text" name="id"/>
  2. <label>Name :</label><textarea name='Name'></textarea>
  3. <label>Value :</label><br /><input type="text" name="Value"/>
  4. <input type="submit" name="submit" value=" submit "/>
  5.  
  6. <?php
  7. session_start();
  8. echo "<table>
  9. <tr>
  10. <th>ID</th>
  11. <th>Name</th>
  12. <th>Value</th>
  13. </tr>";
  14.  
  15. if (isset($_POST['submit'])) {
  16. echo "
  17. <tr>
  18. <td>".$_POST['id']."</td>
  19. <td>".$_POST['Name']."</td>
  20. <td>".$_POST['Value']."</td>
  21. </tr>";
  22. }
  23.  
  24. <?php
  25. session_start();
  26. echo "<table>
  27. <tr>
  28. <th>ID</th>
  29. <th>Name</th>
  30. <th>Value</th>
  31. </tr>";
  32.  
  33. if (isset($_POST['submit'])) {
  34. $_SESSION['posts'][] = $_POST;
  35. foreach ($_SESSION['posts'] as $post)
  36. echo "<tr>
  37. <td>{$post['id']}</td>
  38. <td>{$post['Name']}</td>
  39. <td>{$post['Value']}</td>
  40. </tr>";
  41. }
  42.  
  43. <?php
  44. session_start();
  45. echo "<table>
  46. <tr>
  47. <th>ID</th>
  48. <th>Name</th>
  49. <th>Value</th>
  50. </tr>";
  51.  
  52. if (isset($_POST['submit'])) {
  53. $_SESSION['posts'][] = $_POST;
  54. foreach ($_SESSION['posts'] as $post)
  55. echo "<tr>
  56. <td>{$post['id']}</td>
  57. <td>{$post['Name']}</td>
  58. <td>{$post['Value']}</td>
  59. </tr>";
  60. }
  61.  
  62. ?>
  63. <form action="" method="post">
  64. <label> ID: </label><input type="text" name="id"/><br>
  65. <label>Name :</label><textarea name='Name'></textarea><br>
  66. <label>Value :</label><br /><input type="text" name="Value"/><br>
  67. <input type="submit" name="submit" value=" submit "/><br>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement