-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.php
More file actions
51 lines (49 loc) · 1010 Bytes
/
data.php
File metadata and controls
51 lines (49 loc) · 1010 Bytes
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html>
<head>
<title>Sent Data</title>
<style>
html,
body,
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: "Roboto", sans-serif
}
.sent_data{
text-align: center;
background: #f2fff0;
border: 1px solid #a5d09e;
padding: 25px;
border-radius: 10px;
font-size: 16px;
}
</style>
</head>
<body>
<div class="sent_data">
<?php
if(isset($_POST['submit']))
{
$Name = "Name:".$_POST['fname']."
";
$Email = "Email:".$_POST['email']."
";
$Phone = "Telephone:".$_POST['tphone']."
";
$Message = "Message:".$_POST['message']."
";
$text = $Name . $Email . $Phone . $Message . "\n";
$file=fopen("info.txt", "a");
if(fwrite($file, $text)) {
echo 'Data Sent Successfully';
}
fclose($file);
}
?>
</div>
</body>
</html>