You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
687 B
31 lines
687 B
<?php
|
|
|
|
function test_input($data) {
|
|
$data = trim($data);
|
|
$data = stripslashes($data);
|
|
$data = htmlspecialchars($data);
|
|
return $data;
|
|
}
|
|
|
|
//$test = var_dump($_POST);
|
|
//echo $test;
|
|
|
|
$name = $_POST["name"];
|
|
$email = $_POST["email"];
|
|
$rate = $_POST["rate"];
|
|
$text = $_POST["text"];
|
|
$date = date("H:i:s - d.m.Y");
|
|
|
|
$fname = "<h2>web: ".test_input($name)."</h2>";
|
|
$femail = "<h3>od: ".test_input($email)."</h3>";
|
|
$ftext = "<p>".test_input($text)."</p>";
|
|
$fdate = "<h5>". $date ."</h5>";
|
|
|
|
$full = $fname . $femail . $ftext . $fdate . "<hr>";
|
|
|
|
$myfile = fopen("rating.txt","a") or die("Nelze otevřít");
|
|
|
|
fwrite($myfile, $full);
|
|
fclose($myfile);
|
|
|
|
header("Location: /list.php");
|