-
Notifications
You must be signed in to change notification settings - Fork 2
/
submit.html
91 lines (70 loc) · 18.3 KB
/
submit.html
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<pre>
<span style="font-family: Consolas">
<span style="color: #800000"><?php</span>
<span style="color: #0000ff">if</span><span style="color: #800000">(</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">'news_name'</span><span style="color: #800000">]){</span>
<span style="color: #0000ff">$</span><span style="color: #008080">to </span><span style="color: #800000">= </span><span style="color: #ff00ff">"[email protected]"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">from </span><span style="color: #800000">= </span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"news_email_address"</span><span style="color: #800000">];</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp;<strong>Name: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"news_name"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp;<strong>Email Address: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"news_email_address"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">subject </span><span style="color: #800000">= </span><span style="color: #ff00ff">'Newsletter Subscription'</span><span style="color: #800000">; </span>
<span style="color: #0000ff">$</span><span style="color: #008080">headers </span><span style="color: #800000">= </span><span style="color: #ff00ff">"From: "</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"news_email_address"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"\n"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">headers </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"MIME-Version: 1.0" </span><span style="color: #800000">. </span><span style="color: #ff00ff">"\r\n"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">headers </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"Content-type:text/html;charset=iso-8859-1" </span><span style="color: #800000">. </span><span style="color: #ff00ff">"\r\n"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">send </span><span style="color: #800000">= </span><span style="color: #ff0000">mail</span><span style="color: #800000">(</span><span style="color: #0000ff">$</span><span style="color: #008080">to</span><span style="color: #800000">,</span><span style="color: #0000ff">$</span><span style="color: #008080">subject</span><span style="color: #800000">,</span><span style="color: #0000ff">$</span><span style="color: #008080">message</span><span style="color: #800000">,</span><span style="color: #0000ff">$</span><span style="color: #008080">headers</span><span style="color: #800000">);</span>
<span style="color: #0000ff">if</span><span style="color: #800000">(</span><span style="color: #0000ff">$</span><span style="color: #008080">send</span><span style="color: #800000">)</span>
<span style="color: #800000">{</span>
<span style="color: #0000ff">echo </span><span style="color: #ff00ff">"success"</span><span style="color: #800000">;</span>
<span style="color: #800000">}</span>
<span style="color: #0000ff">else</span>
<span style="color: #800000">{</span>
<span style="color: #0000ff">echo </span><span style="color: #ff00ff">"error"</span><span style="color: #800000">;</span>
<span style="color: #800000">}</span>
<span style="color: #800000">}</span>
<span style="color: #0000ff">if</span><span style="color: #800000">(</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">'fname'</span><span style="color: #800000">]){</span>
<span style="color: #0000ff">$</span><span style="color: #008080">to </span><span style="color: #800000">= </span><span style="color: #ff00ff">"[email protected]"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">from </span><span style="color: #800000">= </span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"email_address"</span><span style="color: #800000">];</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp;<strong>Name: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"fname"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp;<strong>Email Address: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"email_address"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp;<strong>Subject: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"subject"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp; <strong>Message: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"msg"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">subject </span><span style="color: #800000">= </span><span style="color: #ff00ff">'Contact Us'</span><span style="color: #800000">; </span>
<span style="color: #0000ff">$</span><span style="color: #008080">headers </span><span style="color: #800000">= </span><span style="color: #ff00ff">"From: "</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"email_address"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"\n"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">headers </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"MIME-Version: 1.0" </span><span style="color: #800000">. </span><span style="color: #ff00ff">"\r\n"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">headers </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"Content-type:text/html;charset=iso-8859-1" </span><span style="color: #800000">. </span><span style="color: #ff00ff">"\r\n"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">send </span><span style="color: #800000">= </span><span style="color: #ff0000">mail</span><span style="color: #800000">(</span><span style="color: #0000ff">$</span><span style="color: #008080">to</span><span style="color: #800000">,</span><span style="color: #0000ff">$</span><span style="color: #008080">subject</span><span style="color: #800000">,</span><span style="color: #0000ff">$</span><span style="color: #008080">message</span><span style="color: #800000">,</span><span style="color: #0000ff">$</span><span style="color: #008080">headers</span><span style="color: #800000">);</span>
<span style="color: #0000ff">if</span><span style="color: #800000">(</span><span style="color: #0000ff">$</span><span style="color: #008080">send</span><span style="color: #800000">)</span>
<span style="color: #800000">{</span>
<span style="color: #0000ff">echo </span><span style="color: #ff00ff">"success"</span><span style="color: #800000">;</span>
<span style="color: #800000">}</span>
<span style="color: #0000ff">else</span>
<span style="color: #800000">{</span>
<span style="color: #0000ff">echo </span><span style="color: #ff00ff">"error"</span><span style="color: #800000">;</span>
<span style="color: #800000">}</span>
<span style="color: #800000">}</span>
<span style="color: #0000ff">if</span><span style="color: #800000">(</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">'app_fname'</span><span style="color: #800000">]){</span>
<span style="color: #0000ff">$</span><span style="color: #008080">to </span><span style="color: #800000">= </span><span style="color: #ff00ff">"[email protected]"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">from </span><span style="color: #800000">= </span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"app_email_address"</span><span style="color: #800000">];</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp;<strong>First Name: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"app_fname"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp;<strong>Last Name: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"app_lname"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp;<strong>Email Address: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"app_email_address"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp; <strong>Phone No: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"app_phone"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp; <strong>Appointment Date: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"datepicker"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp; <strong>Gender: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"gender"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">message </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"&nbsp;&nbsp;&nbsp;&nbsp; <strong>Message: </strong>"</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"app_msg"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"<br />"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">subject </span><span style="color: #800000">= </span><span style="color: #ff00ff">'Book Appointment'</span><span style="color: #800000">; </span>
<span style="color: #0000ff">$</span><span style="color: #008080">headers </span><span style="color: #800000">= </span><span style="color: #ff00ff">"From: "</span><span style="color: #800000">.</span><span style="color: #0000ff">$</span><span style="color: #008080">_POST</span><span style="color: #800000">[</span><span style="color: #ff00ff">"app_email_address"</span><span style="color: #800000">].</span><span style="color: #ff00ff">"\n"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">headers </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"MIME-Version: 1.0" </span><span style="color: #800000">. </span><span style="color: #ff00ff">"\r\n"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">headers </span><span style="color: #800000">.= </span><span style="color: #ff00ff">"Content-type:text/html;charset=iso-8859-1" </span><span style="color: #800000">. </span><span style="color: #ff00ff">"\r\n"</span><span style="color: #800000">;</span>
<span style="color: #0000ff">$</span><span style="color: #008080">send </span><span style="color: #800000">= </span><span style="color: #ff0000">mail</span><span style="color: #800000">(</span><span style="color: #0000ff">$</span><span style="color: #008080">to</span><span style="color: #800000">,</span><span style="color: #0000ff">$</span><span style="color: #008080">subject</span><span style="color: #800000">,</span><span style="color: #0000ff">$</span><span style="color: #008080">message</span><span style="color: #800000">,</span><span style="color: #0000ff">$</span><span style="color: #008080">headers</span><span style="color: #800000">);</span>
<span style="color: #0000ff">if</span><span style="color: #800000">(</span><span style="color: #0000ff">$</span><span style="color: #008080">send</span><span style="color: #800000">)</span>
<span style="color: #800000">{</span>
<span style="color: #0000ff">echo </span><span style="color: #ff00ff">"success"</span><span style="color: #800000">;</span>
<span style="color: #800000">}</span>
<span style="color: #0000ff">else</span>
<span style="color: #800000">{</span>
<span style="color: #0000ff">echo </span><span style="color: #ff00ff">"error"</span><span style="color: #800000">;</span>
<span style="color: #800000">}</span>
<span style="color: #800000">}</span>
<span style="color: #800000">?></span>
</span>
</pre>