I'm trying to figure out the glitch in modifying this simple php email form below.
What I am trying to do is assign the form values to the php variables, but with a bit of a twist.
In the $message content, I would like to combine 'name' and 'email' (address) from the form to also be the 1st part of the $message before the users message. Kind of like:
(Message Area between ====)
From: Joe Blow
E-mail: joe@blow.com
...blank line here...
Users message content here from the textarea box
...
...
etc.
I'm also missing something in the Form 'action' part but not sure what to use.
Tnx for any help.
<?php
?>
<html>
<head>
<title>E-mail Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<FORM method="POST">
SIMPLE E-MAIL FORM:<br><br>
Name:<br> <input name="name" type="text" size="50"><br>
E-mail:<br> <input name="email" type="text" size="50"><br>
Subject:<br> <input name="subject" type="text" size="50"><br>
Message:<br> <textarea name="message" cols="50" rows="10" type="text"></textarea><br><br>
<?php
$email ="destination@address.com":
$subject ="This is the Subject Text":
$message ="Email message content here.":
$replyto ="senderemail@address.com":
// send email
mail ("$email","$subject","$message","$replyto");
exit;
?>
<input name="submit" type="button" value="Send Mail">
</FORM>
</body>
</html>
<?php
?