Advertisement
Guest User

tarefas.php

a guest
Apr 16th, 2014
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. if(isset($_GET['nome']) && $_GET['nome'] != ''){
  5.     $tarefa = array();
  6.    
  7.     $tarefa['nome'] = $_GET['nome'];
  8.    
  9.     if(isset($_GET['descricao'])){
  10.         $tarefa['descricao'] = $_GET['descricao'];
  11.     }else{
  12.         $tarefa['descricao'] = '';
  13.     }
  14.    
  15.     if(isset($_GET['prazo'])){
  16.         $tarefa['prazo'] = $_GET['prazo'];
  17.     }else{
  18.         $tarefa['prazo'] = '';
  19.     }
  20.     $tarefa['prioridade'] = $_GET['prioridade'];
  21.    
  22.     if(isset($_GET['concluida'])){
  23.         $tarefa['concluida'] = $_GET['concluida'];
  24.     }else{
  25.         $tarefa['concluida'] = '';
  26.     }
  27.    
  28.     $_SESSION['lista_tarefas'][] = $tarefa;
  29. }
  30.    
  31.    
  32.    
  33.    
  34.     include "template.php";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement