-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpurchase.php
More file actions
34 lines (23 loc) · 776 Bytes
/
purchase.php
File metadata and controls
34 lines (23 loc) · 776 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
<?php
## CONFIG ##
# LIST EMAIL ADDRESS
$recipient = "piiamt.tinuviel@gmail.com";
# SUBJECT (Subscribe/Remove)
$subject = "Purchase";
# RESULT PAGE
$location = "enter the URL of the result page here";
## FORM VALUES ##
# SENDER - WE ALSO USE THE RECIPIENT AS SENDER IN THIS SAMPLE
# DON'T INCLUDE UNFILTERED USER INPUT IN THE MAIL HEADER!
$sender = $recipient;
# MAIL BODY
$body .= "Name: ".$_REQUEST['name']." \n";
$body .= "Email: ".$_REQUEST['mail']." \n";
$body .= "Address: ".$_REQUEST['address']." \n";
$body .= "Painting: ".$REQUEST['paintingname']." \n";
# add more fields here if required
## SEND MESSGAE ##
mail( $recipient, $subject, $body, "From: $sender" ) or die ("Mail could not be sent.");
## SHOW RESULT PAGE ##
header( "Location: $location" );
?>