diff --git a/index.php b/index.php index 2c66658..f1e18a2 100644 --- a/index.php +++ b/index.php @@ -2,13 +2,33 @@ session_start(); $db_servername = 'localhost'; + $db_login = ''; $db_password = ''; $db_name = ''; +$db_login_tasks = ''; +$db_password_tasks = ''; +$db_name_tasks = ''; + mysql_connect("$db_servername", "$db_login", "$db_password"); mysql_select_db("$db_name"); +$db = mysqli_connect("$db_servername", "$db_login_tasks", "$db_password_tasks", "$db_name_tasks"); + +if (isset($_POST["submit"]) && $_SESSION['zalogowany'] = true) { + $task = $_POST["task"]; + $login = $_SESSION['login']; + mysqli_query($db, "INSERT INTO `tasks_'$login'` (tasks) VALUES ('$task')"); + header('location: index.php'); +} + +?> + + + +".$_SESSION['login'].""; echo ' [Wyloguj]'; + + ?> + +
+ +Numer | +Zadanie | +Akcja | +
+ | + | + USUN + | +