backup
This commit is contained in:
25
php-s1/workshop6/Views/persistence.phtml
Executable file
25
php-s1/workshop6/Views/persistence.phtml
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php require('template/header.phtml') ?>
|
||||
<h4>Please Enter your Name and Birthday:</h4>
|
||||
|
||||
<?php
|
||||
if (!isset($_SESSiON["name"])) {
|
||||
echo '
|
||||
<form method="post" action="" class="form text-primary">
|
||||
<br>
|
||||
<label for="name">Name</label>
|
||||
<input class="form-control" type="text" id="name" name="name">
|
||||
<label for="birthday">Birthday</label>
|
||||
<input class="form-control" type="date" id="birthday" name="birthday">
|
||||
<br>
|
||||
<input class="btn btn-primary" type="submit" name="submit" value="Submit">
|
||||
<input class="btn btn-primary" type="submit" name="reset" value="Reset">
|
||||
</form>
|
||||
';
|
||||
}
|
||||
if (isset($_SESSiON["name"])) {
|
||||
echo 'Welcome ' . $_SESSION["name"] . '!' . "You were born on " . $_SESSION["date"];
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?php require('template/footer.phtml') ?>
|
Reference in New Issue
Block a user