Browse Source

added sessions

One-Form
LanderNeufcourt 3 years ago
parent
commit
e538563dcb
3 changed files with 6 additions and 3 deletions
  1. 2
    1
      action_page.php
  2. 2
    1
      leeftijd.php
  3. 2
    1
      schot.php

+ 2
- 1
action_page.php View File

@@ -1,7 +1,8 @@
<?php session_start (); ?>
<html>

<body>
<?php $_SESSION['name'] = $_POST ['name'];?>
<h1>Welcome
<?php echo $_POST['name']; ?>
</h1>

+ 2
- 1
leeftijd.php View File

@@ -1,9 +1,10 @@
<?php session_start (); ?>
<html>

<body>

<h1>Welcome
<?php echo $_POST['name']; ?>
<?php echo $_SESSION['name']; ?>
</h1>
<form action="/forms/schot.php" method="POST">
<label for="leeftijd">geef shot:</label><br>

+ 2
- 1
schot.php View File

@@ -1,8 +1,9 @@
<?php session_start (); ?>
<html>
<body>
<h1>Welcome
<?php echo $_POST['name']; ?>
<?php echo $_SESSION['name']; ?>
</h1>
uw shot was : <?php echo $_POST['shot']; ?>
</body>

Loading…
Cancel
Save