<?php
if (isset($_POST['k1'])) {
		require_once('../../wiras_php/wa_baza/wa_polacz.php');
		$id = $_POST['k1'];
		$tytul = $_POST['k2'];
		$zap = "SELECT * FROM animacja WHERE id_user=$id AND tytul='$tytul'";
		if ($pobierz = mysqli_query($db, $zap)) {
			$lr = $pobierz->num_rows;
			if ($lr>0) {
				$wiersz = $pobierz->fetch_assoc();
				$tab[0] = $wiersz['kierunek'];
				$tab[1] = $wiersz['odleglosc'];
				$tab[2] = $wiersz['predkosc'];
				$tab[3] = $wiersz['efekt'];
				$tab[4] = $wiersz['start'];
				$tab[5] = $wiersz['obrazek'];
				$tab[6] = $wiersz['tekst'];
				$tab[7] = $wiersz['muzyka'];
				$tab[8] = $wiersz['kolor'];
				$tab[9] = $wiersz['kolort'];
				$tab[10] = $wiersz['tapeta'];
				$tab[11] = $wiersz['tytul'];
				$tab[12] = $wiersz['data'];
			}
		}
		
		echo json_encode($tab);
		
		unset($tab);
		unset($pobierz);		
		unset($_POST['k1']);
		unset($_POST['k2']);
	} else exit;
	
?>