-
Notifications
You must be signed in to change notification settings - Fork 0
/
uprav_subor.php
34 lines (31 loc) · 1.18 KB
/
uprav_subor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="expires" content="mon, 27 sep 2010 14:30:00 GMT" />
<link rel="stylesheet" type="text/css" href="style.css">
<title>Úprava otázok kvízu</title>
<script>
function validateForm() {
var x = document.forms["uprava"]["text"].value;
if (x == "") {
alert("Zadaj text, ktorý chceš uložiť.");
return false;
}
}
</script>
</head>
<body>
<h1>Úprava otázok kvízu</h1>
<?php $text = file_get_contents($_GET["subor"]); ?>
<form name="uprava" action="zapis_upravu_suboru.php" onsubmit="return validateForm()" method="post">
<textarea name="text" required><?php echo htmlspecialchars($text) ?></textarea>
<input type="hidden" name="subor" value="<?php echo $_GET["subor"] ?>" />
<input type="submit" name="uloz" value="Uložiť" />
</form>
<p class="centrovane"><a href="sprava.php">Späť na správu kvízov</a></p>
</body>
</html>