simpleWordsCloud/save.php

38 lines
554 B
PHP
Raw Normal View History

2020-11-15 21:51:28 +01:00
<?php
include('db.php');
$db = new DataBase();
if (!$db->isInit()) {
echo 'Error db init';
return;
}
if (empty($_POST)) {
header('Location: index.php');
die();
}
echo '<pre>';
var_dump($_POST);
echo '</pre>';
$id = null;
foreach ($_POST as $name => $value) {
if ($name == 'fid') {
$id = $value;
continue;
}
if (isset($id)) {
$value = trim(strtolower($value));
$db->addWord($id, $value);
}
}
if (empty($id)) {
header('Location: index.php');
die();
}
2020-11-16 21:31:59 +01:00
header('Location: index.php');
//header('Location: result.php?id=' . $id);
2020-11-15 21:51:28 +01:00
die();