This is one of the fastest ways to get data submitted by a HTML form, make it readable and send it by e-mail. Fast and easy. From the raw example to some basic functionality.
E-mail form data quick and easily with PHP
# To get more information about this code and some extras please visit:
# http://www.daniweb.com/techtalkforums/showthread.php?p=101880#post101880
# Create an empty message variable.
$message="";
# The mail that we want to use to recevie the submitted information.
$to="info@mydomain.com";
# The E-Mail subject
$subject="This is a message from Page X";
# iterate the $_POST array
foreach ($_POST as $key=>$value) {
$message.=$key.": " . $value . "\n";
}
# Send message by e-mail.
$sm=mail($to, $subject, $message);
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.