<?php
if(isset($_POST['submit'])) {
$to = "receiver@domain.com"; // this is IT Support Email address
$from = $_POST['email']; // this is the sender's Email address
$first_name = $_POST['first_name']; // sender's first name
$last_name = $_POST['last_name']; // sender's last name
$subject = "Form submission"; // Email confirmation submission
from sender
$subject2 = "Copy of your form submission"; // Email confirmation submission
from receiver
$message = $first_name . " " . $last_name . " requested:" . "\n\n" . $_POST['message']; // Email header
$message2 = "Here is a copy of your message " . $first_name . "\n\n" . $_POST['message'];
$headers = "From:" . $from;
$headers2 = "From:" . $to;
mail($to, $subject, $message, $headers);
mail($from, $subject2, $message2, $headers2); // sends a copy of the message to the sender
echo "Request Submitted Succesfully. Thank you " . $first_name . ", we will
fulfill your request shortly.";
// You can also use header('Location: thank_you.php'); to redirect to
another page.
}
?>
<!DOCTYPE html>
<head>
<title>Device and Set Up Request Form</title>
</head>
<body>
<form action="" method="post">
First Name: <input type="text" name="first_name"><br>
Last Name: <input type="text" name="last_name"><br>
Email: <input type="text" name="email"><br>
Message:<br><textarea rows="5" name="message" cols="30"></textarea><br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
如何在邮件下方添加更多标签以供用户填写?例如,紧跟在&#34;消息:,&#34;我想添加&#34;主管名称&#34;还有更多标签。此外,这些标签不仅出现在网站上,还包装好并通过电子邮件发送给接收方。