-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhero-form.php
More file actions
26 lines (23 loc) · 926 Bytes
/
hero-form.php
File metadata and controls
26 lines (23 loc) · 926 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
<?php
$subject = 'Register New Account on Urip Landing Page'; // Subject of your email
$to = ‘your@address.com’; //Recipient's or Your E-mail
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= "From: " . $_REQUEST['heroEmail'] . "\r\n"; // Sender's E-mail
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$message .= 'ACCOUNT DETAILS: ' . "<br>";
$message .= 'Username: ' . $_REQUEST['heroUsername'] . "<br>";
$message .= 'First Name: ' . $_REQUEST['heroFname'] . "<br>";
$message .= 'Last Name: ' . $_REQUEST['heroLname'] . "<br>";
$message .= 'Email Address: ' . $_REQUEST['heroEmail'] . "<br>";
$message .= 'Phone Number: ' . $_REQUEST['heroPhone'];
if (@mail($to, $subject, $message, $headers))
{
// Transfer the value 'sent' to ajax function for showing success message.
echo 'sent';
}
else
{
// Transfer the value 'failed' to ajax function for showing error message.
echo 'failed';
}
?>