The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Feedback forms, problem with message received by recipient
CLRock
post Nov 2 2014, 04:59 PM
Post #1





Group: Members
Posts: 1
Joined: 2-November 14
Member No.: 21,758



I built a Feedback Form for one of my sites. I used the <form> dkdkdk </form> coding in the webpage using HTML. I used the action:
action="http://www.mywebsite.com/sendmail.php">

The items in the form are: name, address, prof (radio buttons), citystzip, email and message.

I set up the sendmail.php file as follows:

<?php
$name = $_POST['name'];
$address = $_POST['address'];
$citystzip = $_POST['citystzip'];
$email = $_POST['email'];
$prof = $_POST['prof'];
$message = $_POST['message'];

$formcontent="From: $name \n Address: $address \n City, St Zip: $citystzip \n Treated with courtesy: $prof \n Message: $message";$recipient = "rockwell.c@att.net";
$subject = "Contact Form";
$mailheader = "From: $email ";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
header( "Location: contact-confirm.htm" );

?>

Looking at the $formcontent, I would expect to see the message going to the recipient (me while I'm testing) to look like below, EXCEPT, I would expect the name ($name) to show up with From: line and the address ($address) to be on the Address line.

However, I am receiving the message as follows

From: 123 street
Address:
City, St Zip: Anywhere, CA 95000
Treated with courtesy: Praise
Message: I'm a ...........

Can you help me?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 2 2014, 05:25 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



Could you post the HTML form as well?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

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: 18th April 2024 - 06:30 PM