SharedPersonal / Grandpa's Memoir / Format_Stories.phpOpen in CoCalc
Author: Peter Francis
Views : 225
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<link href="favicon.ico" rel="icon" type="image/x-icon">
5
<link crossorigin="anonymous" href=
6
"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
7
integrity=
8
"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
9
rel="stylesheet">
10
<meta content="width=device-width, initial-scale=1.0" name="viewport">
11
<title>
12
Submit Story
13
</title>
14
</head>
15
<body>
16
<div id="main" style="text-align:center; position: relative;">
17
<h1>
18
Submit Story
19
</h1>
20
<br>
21
<div id="form_container" style="width:350px; text-align:center; padding:10px; margin-left: auto ; margin-right: auto ;">
22
<form action = "Format_Storiies.php" method = "post">
23
<input name="title" type="text" placeholder="Title" style="width:100%;">
24
<br>
25
<input name="date" type="text" placeholder="Date" style="width:100%;">
26
<br>
27
<textarea name="Story" type="text" placeholder="Story" style="width:100%; height:300px"></textarea>
28
<br>
29
<br>
30
<button id="submit" type="submit" onClick="submit()" style="width:100%;">Submit</button>
31
<button id="clear" onClick="this.form.reset()" style="width:100%;">Clear</button>
32
</form>
33
<?php
34
// $fileLocation = getenv("DOCUMENT_ROOT") . "/new_stories.txt";
35
// $file = fopen($fileLocation,"w");
36
37
echo $_POST['title']
38
// $date = $_POST['date'];
39
// $story = $_POST['story'];
40
41
// $content = "\story{" + $title + "}{" + $date + "}{" + $story + "}";
42
// fwrite($file,$content);
43
// fclose($file);
44
?>
45
</div>
46
</div>
47
48
</body>
49
50
</html>
51
52
53
54
55
56
57
58
59
60
61
62
63
64