The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Problem With Forms
newwebdesigner
post Aug 15 2014, 02:58 PM
Post #1


Newbie
*

Group: Members
Posts: 12
Joined: 15-August 14
Member No.: 21,405



Hi guys,
So I have been struggling with HTML forms again, and I don't know what is wrong. I don't really know much about PHP but I am trying to learn. I have been having this problem for a few months now, not with this form, but handling forms in general. Thanks in advance for your responces. I took my email out of the following code for safety reasons:
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Basic Form</title>
</head>
<Body>
<form method="post" name="Basicform" action="handle.php">
Enter Name:<input type="text" name="name">
Enter Email:<input type="Text" name="email">
Enter Message:<textarea name="message"></textarea>
<input type="submit" value="Send Form"
</body>
</html>

Here is handle.php:
<?php
$name = $_POST['name'];
$visitor_email = $_POST['email'];
$message = $_POST['message'];


$email_from = 'emailwouldgohere';

$email_subject = "New Form submission";

$email_body = "You have received a new message from the user $name.\n".
"Here is the message:\n $message".


$to = "Emailwouldgohere";

$headers = "From: $email_from \r\n";

$headers .= "Reply-To: $visitor_email \r\n";

mail($to,$email_subject,$email_body,$headers);

?>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 10:59 AM