-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmailingList_processor.php
More file actions
74 lines (50 loc) · 1.37 KB
/
mailingList_processor.php
File metadata and controls
74 lines (50 loc) · 1.37 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php include('library/head_section.inc');?>
<?php include('library/nav_section.inc');?>
<body>
<div class="container" id="main">
<div class="page-text">
<h1>Thanks for Joining our Email List!</h1>
<div class="row">
<div class="col">
<?php
if ($_POST['fullname'] == ""){
header('location: contact.php');
die();// terminates them if they are trying to inject bad code. or exit();
} else {
//print_r($_POST);
//echo '<br><br>';
$fullname = $_POST['fullname'];
$email = $_POST['email'];
echo '<h3>We are updating our resources every day, '.$fullname.' </h3>';
echo '<h4>You will recieve your emails weekly at '.$email.'</h4>';
$openDoc = fopen('mailing_list.txt', 'a+');
if(!$openDoc){
echo 'Nope this didnt work';
exit;
} else {
//echo 'Your doc is there... go look bro';
$mail_info = "$fullname, $email; \n";
//echo $mail_info;
$dataMining = fwrite($openDoc, $mail_info);
if (!$dataMining){
echo 'You were not added to the list, it didnt work';
die();
} else {
echo 'We will get an email out to you soon!';
}
}
}
?>
<!--
<br><br><br>
<h3>Admin Side</h3>
<form method="post" action="list_MailingList.php">
<input type="hidden" name="check" value="yes">
<input type="submit" name="submit" value="See Mailing List"><br><br><br><br>
<a href="Home Page.html">HOME</a>
-->
</form>
</div>
</div>
</div>
<?php include('library/footer_section.inc');?>