diff --git a/formulare_v2/index.php b/formulare_v2/index.php new file mode 100644 index 0000000..b77d6c3 --- /dev/null +++ b/formulare_v2/index.php @@ -0,0 +1,22 @@ + + + + + + + Document + + +

Formulář

+

List

+
+ + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/formulare_v2/list.php b/formulare_v2/list.php new file mode 100644 index 0000000..70f1892 --- /dev/null +++ b/formulare_v2/list.php @@ -0,0 +1,27 @@ + + + + + + + List + + +

List

+

index

+ List byl upraven "; + } + + //načtení souboru pro čtení + $fname = "text.txt"; + $myfile = fopen($fname,"r"); + echo '
'; + echo fread($myfile,filesize($fname)); + echo '
'; + fclose($myfile); + ?> + + \ No newline at end of file diff --git a/formulare_v2/post.php b/formulare_v2/post.php new file mode 100644 index 0000000..0768d66 --- /dev/null +++ b/formulare_v2/post.php @@ -0,0 +1,33 @@ +",$msg); //nahradí zakončení řádku +$fullmsg = "

$name

$msg


"; + +//zapsání do souboru a následné uzavření +fwrite($myfile, $fullmsg); +fclose($myfile); + +//přesměrování na novou stránku +header("Location: /list.php?m=true"); + +// test zápisu +// echo $fullmsg; \ No newline at end of file diff --git a/formulare_v2/text.txt b/formulare_v2/text.txt new file mode 100644 index 0000000..d9e5d0f --- /dev/null +++ b/formulare_v2/text.txt @@ -0,0 +1 @@ +

asd

ddasdasd dqweqwd aysdfasd


asd

asd


\ No newline at end of file