Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,194,759 members, 7,955,888 topics. Date: Sunday, 22 September 2024 at 05:55 PM

Simple Contact Form (please Help) - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Simple Contact Form (please Help) (660 Views)

How To Create A Contact Form For Your Website / Code For Contact Form...help (2) (3) (4)

(1) (Reply)

Simple Contact Form (please Help) by uanda(m): 11:48am On Jul 27, 2015
I have a contact form in my site, where visitors fill there email address and message.

The form send am email to my specified email but did not capture the content of the form.

Please help.

php mail script below.
======================================
<?php
$email = $_POST['email'];
$mess = $_POST['mess'];
$site = "http:myThankYou page";
//$message = stripslashes($_POST['txtMessage']);
$stone = "Contact form";
/**
* Change the email address to your own.
*
* $empty_fields_message and $thankyou_message can be changed
* if you wish.
*/
// Change to your own email address
//$your_email = "gw.dubai@outlook.com";
$your_email = "myemail@myemail.com";
// This is what is displayed in the email subject line
// Change it if you want
$subject = "Message via your Contact form";
// This is displayed if all the fields are not filled in
$empty_fields_message = "<p>Please go back and complete all the fields in the form.</p>";
// This is displayed when the email has been sent
$thankyou_message = "<p>Thankyou. Your message has been sent.</p>";
$thankyou_message .= "<p>Stone.</p>";

$message = "<b>Contact Details Below</b>";
$message .= "==============================";
$message .= "Email Address: " . $email . " Message: " . $mess;

mail($your_email, $subject, $message, "From: " . $stone);
// Display the thankyou message

header(sprintf("Location: %s", $site));
// $header ();
?>
Re: Simple Contact Form (please Help) by mezehi5(m): 11:55am On Jul 27, 2015
uanda:
I have a contact form in my site, where visitors fill there email address and message.

The form send am email to my specified email but did not capture the content of the form.

Please help.

php mail script below.
======================================
<?php
$email = $_POST['email'];
$mess = $_POST['mess'];
$site = "http:myThankYou page";
//$message = stripslashes($_POST['txtMessage']);
$stone = "Contact form";
/**
* Change the email address to your own.
*
* $empty_fields_message and $thankyou_message can be changed
* if you wish.
*/
// Change to your own email address
//$your_email = "gw.dubai@outlook.com";
$your_email = "myemail@myemail.com";
// This is what is displayed in the email subject line
// Change it if you want
$subject = "Message via your Contact form";
// This is displayed if all the fields are not filled in
$empty_fields_message = "<p>Please go back and complete all the fields in the form.</p>";
// This is displayed when the email has been sent
$thankyou_message = "<p>Thankyou. Your message has been sent.</p>";
$thankyou_message .= "<p>Stone.</p>";

$message = "<b>Contact Details Below</b>";
$message .= "==============================";
$message .= "Email Address: " . $email . " Message: " . $mess;

mail($your_email, $subject, $message, "From: " . $stone);
// Display the thankyou message

header(sprintf("Location: %s", $site));
// $header ();
?>
Hmmm...may I be off help? Drop your email
Re: Simple Contact Form (please Help) by uanda(m): 2:27pm On Jul 27, 2015
email: tutusaint@yahoo.com

Thanks for the help.

I receive the mail but without the form contents (Email and Message)

(1) (Reply)

Help With Javascript Coding On My Website / Liking' On Facebook Is About To Get Interesting With New 'reactions' Emoticons / Learning Node.js

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 20
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.