-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.php
33 lines (24 loc) · 837 Bytes
/
form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
require_once('config.php');
require_once(SPYC);
global $logger;
//print_r($_POST);
if(isset($_POST['form'])){
$logger->log(0,"form.php",
"\$post is set proceeding to process request");
if($_POST['form']=="ShoppingList"){
$form = new Form("index.php",
FORMS_PATH.DS."todoInputs.yaml", "TodoList");
}elseif($_POST['form']=="TodoList"){
$form = new Form("index.php",
FORMS_PATH.DS."formInput.yaml", "ShoppingList");
}
$page=$form->toString();
echo $page;
$logger->log(0,"form.php", "presenting form defined in {$formInput}");
}elseif(isset($_POST['ShoppingList']) || isset($_POST['TodoList'])){
//then we'll edit the id passed as its value
}else{
$logger->log(0,"form.php", "\$post is not set, redirecting to index.php");
header("Location: index.php");
}