Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require "header.php";
- ?>
- <div class="w3-main" style="margin-left:250px">
- <div class="w3-row w3-padding-64">
- <div class="w3-twothird w3-container">
- <h1><b>Add List</b></h1>
- <h3>Items will be added to My List Today page</h3>
- <?php
- date_default_timezone_set('Pacific/Auckland');
- $date = date('m/d/Y');
- echo "<p><b>Date today:</b> New Zealand - " . $date. "</p>";
- ?>
- <br>
- <form action="includes/addlist.inc.php" method="post">
- <input type="text" name="list-item" placeholder="Add an item">
- <button class="w3-button w3-green" type="submit" name="item-submit">Add</button>
- </form>
- <?php
- if(isset($_GET['added'])){
- if($_GET['added'] == 'success'){
- echo 'Success. List updated!';
- }
- }
- if(isset($_GET['added'])){
- if($_GET['added'] == 'error'){
- echo 'Error: Falied to add item. Try again.';
- }
- }
- if(isset($_GET['error'])){
- if($_GET['error'] == 'emptyfields'){
- echo 'Error: Field is empty';
- }
- }
- if(isset($_GET['error'])){
- if($_GET['error'] == 'toolong'){
- echo 'Error: Use less than 50 characters please.';
- }
- }
- ?>
- </div>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement